Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reverse print_r() 1

Status
Not open for further replies.

Sleidia

Technical User
May 4, 2001
1,284
FR

Hello guys,

If you have : $string_from_array = print_r($array, true);

How could you possibly get the original $array from $string_from_array ?

I tried $array = array($string_from_array), but of course, it didn't work.

Thanks for the help ! :)
 

Thanks sleipnir 214 :)

That's exactly what I needed !

In my opinion, they should have made it so that serialize doesn't use double quotes because you have to remove them when serialize is used in a hidden form field.
 
I don't think serialize() was intended to be used with an HTML form. Most likely, that functionality was developed for situations where you have to store data to a file. Like sessions.

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top