On Thu, July 12, 2007 1:34 am, Chris wrote:
> Olav Mørkrid wrote:
>> let's say we have the following associative array:
>>
>> $array = array(
>> "red" => "ferrari",
>> "yellow" => "volkswagen",
>> "green" => "mercedes",
>> "blue" => "volvo"
>> );
>>
>> then we have a current index into the arra
yep, a for loop is the fallback i use now.
any reason why there isn't a built-in function for this?
any plans for it in future versions of php?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Olav Mørkrid wrote:
chris
for your suggestion to work, the internal array pointer of $array
would first have to be set to point to the current element ($index).
but how do you do this?
this may seem like childs play, but i actually can't find any
documented php function for this. it would be s
chris
for your suggestion to work, the internal array pointer of $array
would first have to be set to point to the current element ($index).
but how do you do this?
this may seem like childs play, but i actually can't find any
documented php function for this. it would be something like:
array
Olav Mørkrid wrote:
let's say we have the following associative array:
$array = array(
"red" => "ferrari",
"yellow" => "volkswagen",
"green" => "mercedes",
"blue" => "volvo"
);
then we have a current index into the array:
$index = "yellow";
$current = $array[$index];
now: how do i get the
Olav Mørkrid wrote:
let's say we have the following associative array:
$array = array(
"red" => "ferrari",
"yellow" => "volkswagen",
"green" => "mercedes",
"blue" => "volvo"
);
then we have a current index into the array:
$index = "yellow";
$current = $array[$index];
now: how do i get the
6 matches
Mail list logo