I have a mysql table called “cat_id”.
My website is coded to display a list of sentences per page. But i also want these divs that show the sentences on the page to display the category id that they are.
So the categories only start above the number 0 in my database. So how would i make an if statment that says and put it in these divs where the content is displayed that if the “cat_id” is above 0 that it displays this code.
<div class="meta">
<small class="float-left gray">
Your Category: <a href="<?=$u?>categories/<?=$cat_record['cat_id']?>/<?=$page_no?>"><?=stripslashes($cat_record['cat_id'])?></a>
</small>
</div>
So I assume this code is lifted from within the query body, if so, you can just wrap an if statement around it