Re: PHP problem with array keys / pointers
| From: | Pintér Tibor | Date: | Sun, 17 Dec 2006 18:47:41 +0000 |
| Subject: | Re: PHP problem with array keys / pointers | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-245926@lists.php.net to get a copy of this message | ||
1 => cat 2 => dog 3 => mouse 4 => horse iwfm with array(1=>'cat',2=>'dog',3=>'mouse',4=>'horse'):output: Array ( [1] => cat [2] => dog [3] => mouse [4] => horse ) dog source: <? $animals=array(1=>'cat',2=>'dog',3=>'mouse',4=>'horse'); print_r($animals); $x=2; echo $animals[$x]."\n"; ?> t