Reply to If Statement Problem

Your name:

Reply:


Posted by bokke on 10/30/06 18:06

Hi,

I have a page that has several stories that run on it from a mysql
database. Right now I use this code:
<img src="Images/NewsPics/<?php echo $row["id"];?>.jpg" border="1"> to
display the image.

BUT I have added a column to the database with 1 or 2 (1=has pic, 2=no
pic). I would like to use an IF STATEMENT - so that:
<?php
if (<?php echo $row["PicNumber"];?> == "2") {
echo "";
} else {
echo "<img src="Images/NewsPics/<?php echo $row["id"];?>.jpg"
border="1">";
}
?>

But I can't seem to embed the <?php echo $row["PicNumber"];?> within
the PHP statement.

What am I doing wrong here? Any help would be much appreciated


Thanks

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация