|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-27 21:15 UTC] derick@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
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.'>