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
iPhone - playing youtube / video / audio of a youtube
using setTimeout with window.opener.location.rel
oad();
Webphere admin console throwing 404 error
asp.net + gridview + linkbutton
Remove Columns from CSV file, save results to new file
Configuring two NIC card with Windows Server 2008
SAS or SATA
Create chart that ignores zero values
Get the name of an active control
for loop in oracle