Re: [PHP] Dazed and Confused

2002-10-30 Thread Rasmus Lerdorf
On Wed, 30 Oct 2002, PHP List wrote: > So are you saying there really is no array pointer? > Lets say I have an array with several different values like: > $myarray["a"] = "s"; > $myarray[3] = "d"; > $myarray["sdf"] = "y"; > There is no way of saying give me the value in the array at position 2? >

Re: [PHP] Dazed and Confused

2002-10-30 Thread PHP List
So are you saying there really is no array pointer? Lets say I have an array with several different values like: $myarray["a"] = "s"; $myarray[3] = "d"; $myarray["sdf"] = "y"; There is no way of saying give me the value in the array at position 2? Since the size of the array is returned as 3, shoul

Re: [PHP] Dazed and Confused

2002-10-30 Thread @ Edwin
Hello, "PHP List" <[EMAIL PROTECTED]> wrote: > For some reason my brain is not operating within normal parameters > this week. > > $myarray["test"] = "sd"; > echo $myarray[0]; > > Why will nothing echo? Do I somehow have to initialize indexing on > the array $myarray? > php says that $myarray

Re: [PHP] Dazed and Confused

2002-10-30 Thread Rasmus Lerdorf
Because you haven't put anything in array index 0. The only array index that has anything is "test". There is no difference between numeric and string indices. You seem to be assuming that somehow the first element in an array can always be accessed as index 0 which is not the case and never has

[PHP] Dazed and Confused

2002-10-30 Thread PHP List
For some reason my brain is not operating within normal parameters this week. $myarray["test"] = "sd"; echo $myarray[0]; Why will nothing echo? Do I somehow have to initialize indexing on the array $myarray? php says that $myarray is an array, but I can't access it with numeric indexes. I know i