I got this code below and it shows me just first result of an array. How can it show me all of them?
$res = mysql_query("SELECT clients FROM area ORDER BY date") or die("Error: " . mysql_error());
while($row = mysql_fetch_array($res)){ 
    foreach($row as $value){
        $result = explode(",", $value);
        foreach($result as $newvalue){
            $query="SELECT clients FROM names where names.id='$newvalue'";
            $res2 = mysql_query($query);
            $r = mysql_fetch_array($res2);
            $parent = $r['clients']; 
        }
    }
    // echo part
    echo "<td>" . $parent . "</td>";
}
Also, i would like to echo area name and date but when i do select * and echo name and date i got nothing.
Thanks
 
     
    