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
Visual Studio 2010
HD low level protection
How To Create Cross-Browser Three Column CSS Form
Video editing
osx system no longer logging into windows domain
Excel addins
how to make background black?
split comma delimited values into seperate columns in SQL 2005
Problem with EFS Recovery
Question about Exchange 2010 mailbox move.