Change Function name in a loop
Posted: Mon Mar 05, 2012 3:21 am
Hi Guys,
Does any know how to add a variable value to the name of the following function in a loop
Thanks in advance
Does any know how to add a variable value to the name of the following function in a loop
Code: Select all
$i=1;
while($qryRowName = mysql_fetch_assoc($qryName)){
$i++;
function createTemplatedSlide$i(PHPPowerPoint $objPHPPowerPoint)
{
// Create slide
$slide = $objPHPPowerPoint->createSlide();
// Add background image
$slide->createDrawingShape()
->setName('Background')
->setDescription('Background')
->setPath('./images/realdolmen_bg.jpg')
->setWidth(950)
->setHeight(720)
->setOffsetX(0)
->setOffsetY(0);
// Add logo
$slide->createDrawingShape()
->setName('PHPPowerPoint logo')
->setDescription('PHPPowerPoint logo')
->setPath('./images/phppowerpoint_logo.gif')
->setHeight(40)
->setOffsetX(10)
->setOffsetY(720 - 10 - 40);
// Return slide
return $slide;
}
}