Re: listing the values in an array

From: Date: Wed, 31 May 2000 14:25:12 +0000
Subject: Re: listing the values in an array
Groups: php.general 
Request: Send a blank email to php-general+get-723@lists.php.net to get a copy of this message
put the $ sign in front of your array indices, i.e. for ($i = 1; $i <= 6; $i++) { echo $name[$i] . ' : ' . $column_value[$i] . "<BR>"; } HTH Steff |-------------> |(Embedded | |image moved | |to file: | |pic24282.pcx)| | | |-------------> >------------------------------------------------------------------------| |Andrej Trobentar <andrej.trobentar@rikom.si> | |31.05.2000 16:20 | >------------------------------------------------------------------------| To: php-general@lists.php.net cc: (bcc: Stephan Schoell/CHHOS/ABB) Subject: [PHP-GENERAL] listing the values in an array Security Level:? Internal I have an array[1-6] that contains some values, let's say numbers from 1-6 for example. name[1] = value[1]; name[2] = value[2]; .... How do print out these values? This code prints only " : " out. for ($i = 1; $i <= 6; $i++) { echo $name[i] . ' : ' . $column_value[i] . "<BR>"; } I know that something like that was here on the list already, but my search function in Netscape doesn't work. Tnx for your answers and have a nice day! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#723) next »