tefuzz Posted April 19, 2009 Share Posted April 19, 2009 i have this line of code...it gives me a parse error. can you not use an echo in a shortened if statement? <?php (!empty($errors) ? echo "<span class=\"error\">*</span> Errors found, These errors are highlited in <span class=\"error\">red</span>" : null) ?> Link to comment https://forums.phpfreaks.com/topic/154771-solved-what-am-i-missing-here/ Share on other sites More sharing options...
soak Posted April 19, 2009 Share Posted April 19, 2009 Just pop the echo outside: <?php echo (!empty($errors) ? "<span class=\"error\">*</span> Errors found, These errors are highlited in <span class=\"error\">red</span>" : ""); ?> Link to comment https://forums.phpfreaks.com/topic/154771-solved-what-am-i-missing-here/#findComment-813893 Share on other sites More sharing options...
tefuzz Posted April 19, 2009 Author Share Posted April 19, 2009 Just pop the echo outside: <?php echo (!empty($errors) ? "<span class=\"error\">*</span> Errors found, These errors are highlited in <span class=\"error\">red</span>" : ""); ?> just came in to post that I fixed it, in that exact way...little searching on google got me an answer. thanks Link to comment https://forums.phpfreaks.com/topic/154771-solved-what-am-i-missing-here/#findComment-813898 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.