Is it possible and is it the correct way to code using heredoc inside an if statement in php?
if($selection!='')
{
$price=getselection($selection,$getprice[$selection]);
if ($selection<8)
{
print 'Please enter the amount<br />';
print '<form action="" method="post"><input type="text" name="money1" value="'.$money1.'">';
print '<input type="text" name="money2" value="'.$money2.'">';
print '<input type="text" name="money3" value="'.$money3.'"><input type="submit">';
print '<input type="hidden" name="selection" value="'.$selection.'"';
print '</form><br>';
if (($money1!='')&&($money2!='')&&($money3!==''))
{
$total=$money1+$money2+$money3;
$money=getmoney($total);
$change=getchange($total,$price);
}
}
}
echo '</pre>';
I am trying to avoid getting out of the php code, and hopping into html and then back into php again, I was just trying to keep everything on the php script; in addition, using multiple print's is messy, thank you for not flaming.