i have a litte problem! i want to fetch the last 3 rows from my mysql database.. (works)
<?php
$sql = "SELECT id,title,description FROM news ORDER BY `id` DESC LIMIT 0, 3";
$result = mysql_query($sql);
while ($list = mysql_fetch_assoc($result))
{
?>
<div class="one-of-three">
<div class="box">
<h2><?PHP echo ($list['id']);?> <?PHP echo (htmlentities($list['title'],ENT_QUOTES,'UTF-8'));?></h2>
<div class="content clearfix">
<p><?PHP echo (htmlentities($list['description'],ENT_QUOTES,'UTF-8'));?></p>
</div>
</div>
</div>
<?php
}
?>
my problem is the html layout! i have 3 div boxes wich i will float..
<div class="one-of-three">
[...]
</div>
<div class="two-of-three">
[...]
</div>
<div class="three-of-three">
[...]
</div>
but my result gives me
<div class="one-of-three">
[...]
</div>
<div class="one-of-three">
[...]
</div>
<div class="one-of-three">
[...]
</div>
i tried different things but i dont how it works :( you can give me a hint?