Unset mysql_fetch_field object value MYSQL PHP <p>I have a code like this</p> <p>I have a stored procedure which will fetch all the info. But I want in my php view part to display only selected fields. How can I achieve that. Say for ex: the below code has three fields in db. S.No - BookName - Author Name If I want to unset a field value i.e. S.No - How can I do that</p> <p>I have tried the unset function like this. But dnt work unset($res->name->s_no);</p> <h1>Code</h1> <pre><code> &lt;?php $pa_query = mysql_query("call booklist()"); while($i&lt;mysql_num_fields($pa_query)){ $res=mysql_fetch_field($pa_query,$i); ?&gt; &lt;th&gt;&lt;?php echo $res-&gt;name; ?&gt;&lt;/th&gt; &lt;?php $i=$i+1; } ?&gt; </code></pre> <h1>Output</h1> <pre><code> S.No Book Name Author Name </code></pre> <h1>Expected Output</h1> <pre><code> Book Name Author Name </code></pre>