Jump to content

How to convert an recursive array into a string and vice versa


Recommended Posts

Maybe this belongs to the "PHP Newbie forum, but whatver..."

Let's say I have an array which contains array which contain arrays etc...
How can I convert it to a string so I can put it in a MySQL entry in order to take it back later?

Maybe there's a smarter way to do what I'm trying to do. Any ideas? Thank you.
Link to comment
Share on other sites

Could you post up your code so far, or even an explination of what you are trying to acheive with your matryoshka-like arrays - Maybe it could be done without all of the nested arrays.
Link to comment
Share on other sites

[!--quoteo(post=370727:date=May 3 2006, 12:58 AM:name=Horst Azeglio)--][div class=\'quotetop\']QUOTE(Horst Azeglio @ May 3 2006, 12:58 AM) [snapback]370727[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I'm sure it can be done without nested arrays, but I'm sure I will need to convert matryoshka-like arrays to strings someday.
[/quote]
look serialize()
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.