note 76994 added to function.array-combine
| From: | Fred at osu1 dot php dot net | Date: | Thu, 09 Aug 2007 10:49:58 +0000 |
| Subject: | note 76994 added to function.array-combine | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129369@lists.php.net to get a copy of this message | ||
I read many workaround functions for users with php < 5
Here is mine (the simpliest I think) :
<?php
function array_combine($keys, $values) {
$result = array() ;
while( ($k=each($keys)) && ($v=each($values)) ) $result[$k[1]] = $v[1] ;
return $result ;
}
?>
----
Server IP: 217.174.196.197
Probable Submitter: 194.3.129.126 (proxied: 55.141.10.47)
----
Manual Page -- http://www.php.net/manual/en/function.array-combine.php
Edit -- https://master.php.net/note/edit/76994
Del: integrated -- https://master.php.net/note/delete/76994/integrated
Del: useless -- https://master.php.net/note/delete/76994/useless
Del: bad code -- https://master.php.net/note/delete/76994/bad+code
Del: spam -- https://master.php.net/note/delete/76994/spam
Del: non-english -- https://master.php.net/note/delete/76994/non-english
Del: in docs -- https://master.php.net/note/delete/76994/in+docs
Del: other reasons-- https://master.php.net/note/delete/76994
Reject -- https://master.php.net/note/reject/76994
Search -- https://master.php.net/manage/user-notes.php