I have a fair few categories and i want to only show categories that have listings in them, This is the code i have at the moment that shows all categories regardless -
$i_substr_cat=substr_count($category, ".");
foreach($categories as $key=>$value)
{
$i_substr_key=substr_count($key, ".");
if($i_substr_key != ($i_substr_cat+1))
{
continue;
}
if(strpos($key, $category.".", 0) === 0)
{...
PHP:
from PHP https://ift.tt/3dumcgG
via IFTTT

0 Comments