tonelm54
asked on
function in hereDocs
Is it possible to call a function from inside a heredoc?
For example, if I wanted to call date('Y-m-d', $rwTrans['dateTime']) inside the heredoc:-
Any ideas?
For example, if I wanted to call date('Y-m-d', $rwTrans['dateTime']) inside the heredoc:-
echo <<<EOD
<tr data-transID="{$rwTrans['transID']}">
<td>{date('Y-m-d', $rwTrans['dateTime'])}</td>
<td>$transNote</td>
<td>{$rwTrans['amount']}</td>
<td>{$rwTrans['status']}</td>
</tr>
EOD;
Any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.