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) ?> Quote Link to comment 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>" : ""); ?> Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.