Hi all.
I have pictures that I want to include in a php page based on a boolean value in the db. if the value is 1, show this pic. if the value is 2, show that pic, if the value is 3 show that pic. What I need is for ALL of the pics that have values to show, NOT just one of them. If the db has values for 6 pics, then I need to see 6 pics.
I cannot get this to work. When I put my html into the where loop, it loops like 26 pictures, It duplicates them over and over. I know that it is something that I am doing wrong but I can't figure out what I need to do.
I was thinking to put all of the values into an array and then call them out? I can get my data into the array, but I don't know how to extract them. I am only working off of one field in the database. Each html line requires a different value from the db field.
[PHP] if($data['mydbfield'] == "165"){
echo "<img src="blabla" />;
}else{
echo "<img src="SOME OTHER IMAGE" />;
if($data['mydbfield'] == "136"){
echo "<img src="blabla" />;
}else{
echo "<img src="SOME TOTALLY DIFFERENT OTHER IMAGE" />;
}
[/PHP]
If anyone would be good enough to give a hand here, I would really be grateful.
Thanks,
Frank