I have <div>
in php like this..
I have Database name "pv"
and table which have a lot of image name "picture"
How can load image from my table into <div>
in php ?
My div code:
<div id = "leftContent">
<?php
for($i = 1; $i<49; $i++)
{
echo"<div class = product>San Pham $i</div>";
if($i%4==0)
echo "<br />";
}
?>
My css "product" code
{
width:180px;
height:190px;
float:left;
background-color:#33FF99 ;
border-right-color:#000000;
border-bottom-color:#000000;
border-width:1px;
border-style:dashed;
}
Please help I'm just newbie of PHP :(
You did not give us much information about the DB you are using and the structure of it. But as a starting point maybe you wanna read:
http://ch2.php.net/function.mysql-connect or http://www.cramerz.com/php/php_connect_to_db
If you have more concrete questions then, come back and ask.
hope this helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.