note 15718 deleted from language.types.array by jimw
| From: | jimw@php.net | Date: | Fri, 14 Dec 2001 19:54:45 +0000 |
| Subject: | note 15718 deleted from language.types.array by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22676@lists.php.net to get a copy of this message | ||
when using multi-dimensional arrays, there is a specific way an array must be output for it to work
correctly. for example:
$array[0][0]="hey";
$array[0][1]="whats going on";
//this echo wont display the values
//produces "Array[0] Array[1]"
echo "$array[0][0]" . " " . "$array[0][1]";
//this one will
//produces "hey whats going on"
echo $array[0][0] . " " . $array[0][1];
if you want to echo the value of an array, make sure you dont put the array variable inside quotes
as it will not echo the actual value contained in the array location. It took me an hour to find out
why my values werent printing, turns out i had the array locations echoed from inside quotes, which
was erroneous.