Click to See Complete Forum and Search --> : image backgrround problem


experts585
01-19-2010, 08:42 PM
heloo i m trying to background a image with php but getting some problems


<?php

$abcd="http://ejang.jang.com.pk/".$month2."-" .$date."-".$year."/images/15_01.gif"
?>

<div style="background-image:url(<?php echo $abcd; ?>; width:500px; height:30px; "></div>

if i use echo that link the link was ok and if i use <img src"<?php echo $abcd; " /> it shows the image but its dosnt work in bakground,


can someone tel me whats wrong:(:(

aadi
01-20-2010, 04:24 AM
Try this

<div style="background-image:url(<?php echo $abcd; ?>); width:500px; height:30px; "></div>