I'm trying to use sprintf on a heredoc this way. It wont work. Any idea how to solve this?
$i = <<<EOD
This is your invoice for %1$s %1$s %1$s %1$s
EOD;
$year = '2013';
$i = sprintf($i,$year);
echo $i;
Notice: Undefined variable: s in
I'm trying to use sprintf on a heredoc this way. It wont work. Any idea how to solve this?
$i = <<<EOD
This is your invoice for %1$s %1$s %1$s %1$s
EOD;
$year = '2013';
$i = sprintf($i,$year);
echo $i;
Notice: Undefined variable: s in