note 117229 added to function.array-column
| From: | mohanrajnr at gmail dot com | Date: | Wed, 06 May 2015 07:50:54 +0000 |
| Subject: | note 117229 added to function.array-column | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-202455@lists.php.net to get a copy of this message | ||
if array_column does not exist the below solution will work.
if(!function_exists("array_column"))
{
function array_column($array,$column_name)
{
return array_map(function($element) use($column_name){return $element[$column_name];},
$array);
}
}
----
Server IP: 72.52.91.14
Probable Submitter: 122.165.98.98
----
Manual Page -- http://php.net/manual/en/function.array-column.php
Edit -- https://master.php.net/note/edit/117229
Del: integrated -- https://master.php.net/note/delete/117229/integrated
Del: useless -- https://master.php.net/note/delete/117229/useless
Del: bad code -- https://master.php.net/note/delete/117229/bad+code
Del: spam -- https://master.php.net/note/delete/117229/spam
Del: non-english -- https://master.php.net/note/delete/117229/non-english
Del: in docs -- https://master.php.net/note/delete/117229/in+docs
Del: other reasons-- https://master.php.net/note/delete/117229
Reject -- https://master.php.net/note/reject/117229
Search -- https://master.php.net/manage/user-notes.php