0

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? &#10004; :'') . '</td>'; ?>

But, doing that I'm getting the following error message:

Parse error: syntax error, unexpected '&'

How to fix this, please ?

Thanks in advance!

user3821280
  • 39
  • 1
  • 7

1 Answers1

1

Add quotes:

<?php echo '<td>' . ($fiche['statut']==1? '&#10004;' :'') . '</td>'; ?>

Without the quotes, the PHP parser sees &#10004; as PHP code, which generates the syntax error.

Bart Friederichs
  • 33,050
  • 15
  • 95
  • 195