mysqli - PHP add function in EOF -
this question has answer here:
- calling php functions within heredoc strings 17 answers
i need add function result id in eof
see line in page , not work function. how fix this?!
{design_num('61')}
my php:
$stmt->bind_result($id,$first_name, $last_name); $content = <<< eof <tr> <td style="text-align:center;">{design_num($id)}</td> <td style="text-align:right;"><a href="#">{$first_name}</td> <td style="text-align:right;">{$last_name}</td> </tr> eof;
it's feasible, need powerful magic accomplish task
$design_num = design_num($id); $content = <<< eof <tr> <td style="text-align:center;">$design_num</td> <td style="text-align:right;"><a href="#">$first_name</td> <td style="text-align:right;">$last_name</td> </tr> eof;
Comments
Post a Comment