Reputation: 39
I'm currently using php and zend 2, and trying to display this specific char ✔. I've tried this way:
<?php echo '<td>' . ($fiche['statut']==1? ✔ :'') . '</td>'; ?>
But, doing that I'm getting the following error message:
Parse error: syntax error, unexpected '&'
How to fix this, please ?
Thanks in advance!
Upvotes: 0
Views: 73
Reputation: 33521
Add quotes:
<?php echo '<td>' . ($fiche['statut']==1? '✔' :'') . '</td>'; ?>
Without the quotes, the PHP parser sees ✔
as PHP code, which generates the syntax error.
Upvotes: 1