hey guys,
I have made a database using mysql and i am showing it on the browser using php.
now the problem is that i only want those columns to display which have entries or some data in them for a particular row.
Suppose that if there is one entry in a database and all the columns except one is filled.Now I want that the column which is not filled should not be shown in the table in the browser.

PLEASE HELP

try

$dat = mysql_query("SELECT * FROM table");
$data = mysql_fetch_array($dat);

do
{
if($data['text']==""){
continue;
}
echo $data['text'];
}
while($data = mysql_fetch_array($dat));

text is the field which you want to check if it is empty or not.

commented: smart reply.... +2
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.