I want to select two columns value and use them with while, i tried but failed. new to php&Mysql..
Mytable = categories ↓
subcat1 | subcat2 | category |
=======================================
High school| Pvt School | Education |
---------------------------------------
Jr College | Voc College | Education |
=======================================
My Query:
sql="select distinct subcat1, subcat2 from categories where category='Education'";
$category=mysql_query($sql);
<?php
while ($cat = mysql_fetch_assoc($category))
{
?>
<a href="Category.php"> <?php echo $cat['subcat']; ?></a>
Output I want to get :
High School Pvt School Jr College Voc College
Please Help me out.. ♥ Hearty Thanks ♥