This question already has an answer here:
I'm working on a CodeIgniter project but having a problem when using ternary operator, I have this code:
<?php echo (validation_errors()) ? validation_errors() : ((isset($success)) ? $success : ((isset($failed)) ? $failed)); ?>
and I'm getting this error:
Parse error: syntax error, unexpected ')'
Once I comment that line out, the page loads fine.
What could be the issue?
Thank you.
Aucun commentaire:
Enregistrer un commentaire