Re: setting index of array as 1

From: Date: Mon, 18 Oct 2004 17:28:32 +0000
Subject: Re: setting index of array as 1
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-199747@lists.php.net to get a copy of this message
> when create an array using: > $new_array[] = 'something'; > first index of new array is 0 > > how can I though set that first index is 1 - except "reorganize" array > after is created? > > thanks > > -afan $new_array = array(1 => 'first','second','third'); echo $new_array[1]; <--- Will echo first -- --Matthew Sims --<http://killermookie.org>

« previous php.general (#199747) next »