RE: [PHP] Echo a value from an arrays position

From: Date: Thu, 04 May 2006 13:00:20 +0000
Subject: RE: [PHP] Echo a value from an arrays position
Groups: php.general 
Request: Send a blank email to php-general+get-235499@lists.php.net to get a copy of this message
[snip] Of course getting an indexed value into an associative array seems a bit odd to me... maybe Jonas could shed some light on why he would go this route... [/snip] Exactly.... [snip] To get a value from position 2 in an array you use $arrayName[1] (all array elements start numbering at 0, unless you do something to the array to change it). [/snip] I was being too subtle. Anyhow, he has done something to change the array keys. He would have to know that 'black' is the key in position 2. I suspect that he may be overcomplicating code, as many new to programming have a tendency to do (not a hit, just a fact).

« previous php.general (#235499) next »