amr1991
New Member
- Messages
- 396
- Reaction score
- 0
- Points
- 0
I am creating my own CMS. I am trying to implement a navigation system that automatically checks if a page is active, meaning that the page is availible to users. To define whether the page is availible, a variable is placed in a file called config.php.
For example,
if the variable is set to 1, its active, otherwise, its inactive. I want PHP to count how many of those variables are active, then use it in a FOR loop to echo the active variables. Any help would be appreciated.
For example,
PHP:
$news = 1;
$downloads = 0;
$forum = 1;
$gallery = 1;
Last edited by a moderator: