RE: [PHP] loading Arrays

From: Date: Thu, 28 Feb 2002 22:57:31 +0000
Subject: RE: [PHP] loading Arrays
Groups: php.general 
Request: Send a blank email to php-general+get-86672@lists.php.net to get a copy of this message
sure, you can add/remove/modify element whenever you want your syntax is wrong though try this // add value to array if($flag == "true"){ $samplearray[] = $samplevalue; // append value to end of array } -----Original Message----- From: sundogcurt [mailto:sundogcurt@netscape.net] Sent: Friday, March 01, 2002 9:51 AM To: GENERAL PHP LIST Subject: [PHP] loading Arrays Do I have to fully load up an array when I declare it or can I assign more values to it later? What I want to do is something like this : // create empty array $samplearray = array(); // add value to array if($flag == "true"){ $samplearray => $samplevalue; } This doesn't work, can anybody tell me if I'm on the right track here or should I scrap it and start over? Thanks Curt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#86672) next »