Re: Echo a value from an arrays position
| From: | Dave Goodchild | Date: | Thu, 04 May 2006 12:51:06 +0000 |
| Subject: | Re: Echo a value from an arrays position | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-235497@lists.php.net to get a copy of this message | ||
This may clarify - in php, integer and associate arrays are created
arbitrarily, ie keys can be numbers or strings. So, either create an array
like this:
array('1' => 'first element',
'2' => 'second element');and call by the key! On 04/05/06, Jonas Rosling <webmaster@gamearena.se> wrote:
Is there any way to call for an element value in an array by the position? Like position 2 in the array and not the key name. // Jonas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-- http://www.web-buddha.co.uk dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css) look out for project karma, our new venture, coming soon!