Aligning an image to the centre using php.

Soldato
Joined
1 Dec 2004
Posts
22,770
Location
S.Wales
Iv got this output..But i need to centralise the image, for some reason i cant get it working..



echo '<div align="left" class="product">';
echo "<b>Catagory:</b> $catagory <br>
<b>Title: </b>$title <br>
<b> Certificate: </b> $certificate<br>
<b>Price: </b> £$price<br></br>";
echo '<img src='.$image.' />'; //<<<HERE<<<<
echo "</div>";

iv tried

echo '<img align ="center" src='.$image.' />';

and

echo '<img align ='center' src='.$image.' />';

Iv also tried aligning the div to the centre but it takes all the text aswel...
 
So it has to be done in the css file?? so why can i align the image with php the same way i aligned the div??
 
Back
Top Bottom