[code=php]$key = array_search(!NULL, $client); $client[$key] = $_GET[$key];[/code]
I’m trying to find a way so that [i]array_search[/i] finds EVERY key which is !NULL and not only the first one. Apparently, array_search stops when it has found the first key that is !NULL. Maybe combine with a for_each?
Any help would be appreciated.
Thanks
[code=php] foreach( $client as $key=>$val ) if( !$val ) $client[$key] = $_GET[$key]; [/code]
[code=php]foreach($client as $key=>$val){ if($val){ $client[$key] = $_GET[$key]; }}[/code]
Help @mago spread the word by sharing this article on Twitter...