#28185 [Opn->WFx]: function request: array_get
| From: | derick@php.net | Date: | Tue, 27 Apr 2004 19:15:10 +0000 |
| Subject: | #28185 [Opn->WFx]: function request: array_get | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-58883@lists.php.net to get a copy of this message | ||
ID: 28185
Updated by: derick@php.net
Reported By: mail at spybreak dot de
-Status: Open
+Status: Wont fix
Bug Type: Feature/Change Request
Operating System: Windows 2000
PHP Version: 4.3.4
New Comment:
This is not something we will add, as you demonstrated it's easy to use
in user space.
Previous Comments:
------------------------------------------------------------------------
[2004-04-27 17:45:02] mail at spybreak dot de
Description:
------------
I think this could be a useful function in some cases. It's !really!
basic but I need it pretty often (ok not thaaat often).
Why did I request it? It saves me some lines plus a variable.
Reproduce code:
---------------
//with function
function array_get($array, $key)
{
return $array[$key];
}
$img = 'someimg.png';
echo '<img src="'.$img.'"
'.array_get(getimagesize($img),3).'>
//without
$img = 'someimg.png';
$widthheight = getimagesize($img);
$widthheight = $widthheight[3];
echo '<img src="'.$img.'" '.$widthheight.'>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28185&edit=1