Microsoft
Software
Hardware
Network
Question : PHP: use variable in function name?
Hi All,
Is it possible to use a variable in a function name?
i.e.
$img = 'myimage.png';
$filetype = 'png';
$image = 'imagecreatefrom' . $filetype($img); // should be $image = imagecreatefrompng($filena
me);
Answer : PHP: use variable in function name?
Try like below:
$$ should be used here:
$image = 'imagecreatefrom' . $$filetype($img); // should be $image = imagecreatefrompng($filena
me);
Hope this helps
Addy
Random Solutions
open and read a *.xlsx file
Setting Compatibility Mode in IE8 using JavaScript
jQuery Dialog Ajax PHP problem
code for an application which can read a portion of the screen and writes it on another portion of the screen.
office 2003 keeps self installing over 2007
Screen lock/unlock
Crystal cross-tab page numbering
Changing default ring volume on Polycom IP 430 and 650
Passing PChar parm to DLL
VMware Vcenter server connection to iSCSI SAN network