Combing Two If Conditions
-
Trying to get different images to come up under two specific conditions. For example:
<?php
if($item->product_id == ’12’)
{
echo ‘<img src=”ticket6.jpg”>’;
}elseif($item->product_id == ‘2’ and $item->quantity == ‘2’) {
echo ‘<img src=”ticket8.jpg”>’;
}elseif($item->product_id == ‘2’ and $item->quantity == ‘3’) {
echo ‘<img src=”ticket9.jpg”>’;
}
?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Combing Two If Conditions’ is closed to new replies.