Re: EZ array problem - What's wrong with my brain?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brian Dunning wrote:
> That works, but the value 1.2 is unknown, I can't hardcode it.

If it is only a one element array you have several options.


foreach ($array as $unknown_key=>$the_values)
{
 ...
}

or

reset($array);
$the_values = current($array);
$unknown_key = key($array);

or

various other clever things with list and each.....


Col.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux