Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Exporting array

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Exporting array

Postby griffinmt » Mon Feb 10, 2014 4:12 pm

Been away from php for awhile, and forgotten how to 'export' a complex array/object into a text string to be stored in a file. Later I wish to read that file and reload the array/object.
griffinmt
New php-forum User
New php-forum User
 
Posts: 3
Joined: Wed Sep 22, 2010 6:28 pm

Re: Exporting array

Postby macek » Mon Feb 17, 2014 11:42 pm

serialize?
User avatar
macek
php-forum Active User
php-forum Active User
 
Posts: 277
Joined: Wed Aug 25, 2010 10:42 am

Re: Exporting array

Postby seandisanti » Thu Feb 27, 2014 10:44 am

lots of ways to do what you want implode()/join() you can also use json_encode() to create a json object, or even go the xml route http://www.php.net/manual/en/class.simplexmlelement.php
seandisanti
php-forum Fan User
php-forum Fan User
 
Posts: 838
Joined: Mon Oct 01, 2012 12:32 pm


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron