Re: Guidance

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

 



Robert Cummings wrote:
On Wed, 2008-02-27 at 15:48 -0600, Shawn McKenzie wrote:
Stut wrote:
On 27 Feb 2008, at 20:59, Daniel Brown wrote:

I've interviewed more than my fair share of "web developers" who
couldn't reverse an array without using array_reverse if their life
depended on it.

foreach($array as $k => $v) {
    $reversed[$v] = $k;
}
$array = $reversed; //optional

I hope that was a joke... cuz you implemented array_flip() and not
array_reverse().

Cheers,
Rob.

$yarra

--
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