Forum Moderators: coopster

Message Too Old, No Replies

Need array help!

with unserializing.

         

PokeTech

2:10 pm on Jun 28, 2008 (gmt 0)

10+ Year Member



I have an array that I'm getting from my database this is what it looks like before its unsterilized:

a:3:{i:1;s:3:"one";i:2;s:3:"two";i:3;s:5:"three";}

If you notice at the beginning of it it says a:3: How do I get the three out of that data after its be unserialized?

Little_G

2:54 pm on Jun 28, 2008 (gmt 0)

10+ Year Member



Hi,

The 3 is the length of the array, use count [php.net] to get that from the unserialized array.

Andrew

PokeTech

2:58 pm on Jun 28, 2008 (gmt 0)

10+ Year Member



Thanks that worked!