0

I used a component of Joomla for CCKT, it store data after serialize() it,

on the other side I am using another component for generating csv & xls file which convert all the sql data in to csv.

so when i call those data which are stored in db as a serialise it shows in xls also as a serialise & i want them unserialise

so the question is it necessary that the component which generate xls & csv should know the array of the serialise to convert it in un-serialise..??

hakre
  • 193,403
  • 52
  • 435
  • 836
mobi001
  • 517
  • 1
  • 8
  • 19

1 Answers1

0

Check out the documentation:

http://php.net/manual/en/function.serialize.php

PHP serialize creates a string.

CSV generators usually loop through an array for the values, but the DB query returns a string for the serialized value.

Use unserialize() to re-build the serialized array and pass it over to your CSV function.

http://www.php.net/manual/en/function.unserialize.php

Check the PHP documentation and what the CSV function accepts as parameters.

Cheers

igasparetto
  • 1,086
  • 1
  • 12
  • 28