Page 1 of 1

php within php not working

Posted: Wed Feb 11, 2009 6:56 am
by kevrelland
can anyone help me the prod price is not showing inside my conditional region, and i can't think why?

Code: Select all

<?php if ($row_product_listing['prod_special'] == y)
{
echo ' <p class="price_special">Offer price &pound;<?php echo $row_product_listing["prod_price"]; ?></p> ';
}
 ?>
Cheers
Kevin

Re: php within php not working

Posted: Wed Feb 11, 2009 7:29 am
by papa

Code: Select all

 
<?php 
if($row_product_listing["prod_special"] == y) {
    echo ' <p class="price_special">Offer price &pound;'.$row_product_listing["prod_price"].'</p> ';
}
?>
 
Well you already have the php tags open so no need to open them again. And be consequent with your " " and ' '.

Re: php within php not working

Posted: Wed Feb 11, 2009 7:37 am
by kevrelland
Brilliant thanks
works a treat
kev

Re: php within php not working

Posted: Wed Feb 11, 2009 7:42 am
by papa
no probs!