[eluser]paulcj2[/eluser]
I just realized I had the wrong syntax on my view. I changed it to:
Code:
foreach ($prod_cat_results as $prod_cat) {
echo "<h3><a href='/cat_prod/" . SITE_ADDRESS . "/".$prod_cat['>".$prod_cat['name_cat']."</a></h3>";
echo "<p>".$prod_cat['descrip']."</p>";
}
However, it only displays the last category in the foreach loop. The header variable is looking for the variable $descrip. It probably chokes on $prod_cat['descrip'].
So there are two issues here:
1) Why am I not getting a looping to show the list of categories but only the last?
2) I'll have to figure out a way of accommodating the header's need for one variable $descrip instead of the looped description for each category.
I can use help on #1.
BTW, the first variable $prod-cat['id_cat'] is not displaying correctly in this post, but it is right in my script.