[development] Serialized Data

Steve Ringwood nevets at tds.net
Fri Nov 11 13:49:59 UTC 2011


Lynn

     You can use the unserialize() function to get  at the data, something like

     $info = unserialize($data);

Nevets

> Hello,
>
> I'm trying to create an Ubercart module to show products with their attribute option name.
>
> Could anyone guide me (or provide a link) how to get the '29', via PHP or function, from this serialized data:  a:1:{i:3;s:2:"29";}  If there are two product attributes, I would need to extract the 155 and 154 from this: a:2:{i:3;s:3:"155";i:17;s:3:"154";}
>
> Thanks,
> Lynn

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20111111/f02b4b09/attachment.html 


More information about the development mailing list