question from a php newbie

From: Date: Sat, 18 Aug 2001 03:25:34 +0000
Subject: question from a php newbie
Groups: php.general 
Request: Send a blank email to php-general+get-63266@lists.php.net to get a copy of this message
I'm so new to this, in fact, that I may not be able to even frame my question correctly. Please bear with me. Suppose that I had a list in a data base of, say, countries and that I built an array as $states = array ( array("abbr"=>"MA", "name"=>"Massachusetts"), array("abbr"=>"NY", "name"=>"New York"), array("abbr"=>"CA", "name"=>"California"), [. . .] ) is there a way to dump this array in a form which would allow it to be written to an 'include' file. I tried both var_dump and print_r but neither method seems to have worked correctly. The actual array which I have in mind is much more complicated structurally than the states array shown above, but it is unlikely to change more than once a day so it seems wastefull to probe the database each time a copy is needed. av0-

« previous php.general (#63266) next »