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
Php and Apache server 2.2
WDS Server 2008 R2 - PXE Error
ForeFront - TMG
Group Policy applied to Terminal Server is stopping Shortcuts placed in Public Desktop from appearing
SOAP, WEB Service, VB.NET
screenprint32 does not work on windows 7 what is a replacement ?
Citrix Receiver for Blackberry devices
CVV2 checker for C# code
dell powervault ejection issues
How can I access the rest of my hard disk?