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
Bash Shell script interview questions
IPSEC VPN vs SSL VPN
group policy missing options
XP 10 inbound connection limit question
Just installed SQL Server 2005, but no instance appears
Convert C# to VB
Make list of all changes in the next 5 days
Eclipse installation
Downgrade to XP
Localized Date format