sam9461
01-20-2012, 01:07 AM
Hi, experts, help please, thank you so much.
I wrote css style for an image by PHP, as follows:
<img src="<?php echo "/images/prizes/".$_SESSION['imgForPrizes'][$key1]; ?>" >
It's working , and fine.
However, if I want the image as a background, and wrote as below:
<.... style="background:url(“<?php echo “/images/prizes/”.$_SESSION['imgForPrizes'][$key1]; ?>”) no-repeat center; ">
It's not working, the image doesn't show on the web page.
Could experts help me to sort the problem out?
Thank you!
I wrote css style for an image by PHP, as follows:
<img src="<?php echo "/images/prizes/".$_SESSION['imgForPrizes'][$key1]; ?>" >
It's working , and fine.
However, if I want the image as a background, and wrote as below:
<.... style="background:url(“<?php echo “/images/prizes/”.$_SESSION['imgForPrizes'][$key1]; ?>”) no-repeat center; ">
It's not working, the image doesn't show on the web page.
Could experts help me to sort the problem out?
Thank you!