display the result
<pre><code>class Connect {
        function connect_db()
        {
        $DBHost="localhost";
        $DBUser="root";
        $DBPassword="";
         $DB="test";
        $DBLink=mysql_connect($DBHost,$DBUser,$DBPassword) or die("Failed to Connect to Database...");
        mysql_select_db($DB,$DBLink) or die("Unable to Select Database...");
        return $conn;
        }

}

class Query extends Connect
{
    function select_query($tablename)
    {
    Connect::connect_db();

    $select_tb=mysql_query("select * from ".$tablename."  ");
    while($getResult=mysql_fetch_object($select_tb))
    {
    $row=var_dump($getResult);
    }
    return (object)$row ;
    }
}
$conn=new Query();
$getRow=$conn-&gt;select_query('employee');  
$arr[]=$getRow;

print_r($getRow);
</code></pre>

<p>i am getting this</p>

<pre><code>object(stdClass)#2 (3) { ["id"]=&gt; string(1) "1" ["ecode"]=&gt; string(4) "e040" ["name"]=&gt; string(20) "anuradha chakraborti" } object(stdClass)#3 (3) { ["id"]=&gt; string(1) "2" ["ecode"]=&gt; string(4) "E041" ["name"]=&gt; string(6) "banshi" }
</code></pre>

<p>i want to display</p>

<p>id          name             ecode</p>

<p>1anuradha chakraborti e040</p>

<p>2 banshi                    E041</p>
