blackwinds Posted October 30, 2015 Share Posted October 30, 2015 (edited) i have categories but AUCTIONS category has more than 100 sub categories how can i limit this subcategories to 5 or 10 ? my AUCTIONS category id is 25 i write this if (($category['id_category']) == 25){ $html .= '<a href="/onceki-muzayedeler/">See all past auctions</a>'; } it works but how can i put a limit has any one idea ? can i declear a limit but how ? Edited October 30, 2015 by blackwinds (see edit history) Link to comment Share on other sites More sharing options...
blackwinds Posted October 30, 2015 Author Share Posted October 30, 2015 i solve it may be someone need in future for category 25 i put a variable and i modify the category list loop with if ($mycount++ < 4) if (($category['id_category']) == 25){ $mycount==0; } foreach ($categories as $key => $category)if ($mycount++ < 4) { Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now