ayok Posted November 24, 2007 Share Posted November 24, 2007 Hi, I have a question with php script for "if" statement. I have this php code for a news with image in it: <?php echo "$data[day_news], $data[date_news], $data[time_news]<br><b>$data[by]</font></b><br><br>"; echo "<h1>$data[title]</h1>"; echo "<a href=detail_news.php?id=$data[news_id]><img align='left' src='images/$data[image]'></a>"; echo "$data[body]"; But if there is no image uploaded, it has a cross box where the image should be there. What should I write if I don't want any image if I didn't upload the image? Thank you, ayok Quote Link to comment https://forums.phpfreaks.com/topic/78663-solved-if-empty-code-help/ Share on other sites More sharing options...
ayok Posted November 24, 2007 Author Share Posted November 24, 2007 sorry I'm too lazy. it's solved. Thx Quote Link to comment https://forums.phpfreaks.com/topic/78663-solved-if-empty-code-help/#findComment-398041 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.