Its my first time trying this soo i am not sure it its going to correct way or how i could do something like this!! But what i want is an function with PHP and HTML together something like this.
function hoofdMenu1()
{
return '
<!-- Columns are always 50% wide, on mobile and desktop -->
<div class="container">
<div id="hoofdmenu" class="col-xs-12 col-sm-2 col-md-2 col-lg-2">
<ul class="nav nav-pills nav-stacked">
foreach($aMenu as $entry)
{
foreach($entry as $key)
{
$sClass='';
if($entry["page"] == $_GET['page'] ) :
$sClass= 'active';
endif;
echo '
<li class="'.$sClass.'" role="presentation"><a
href="index.php
page='.$entry["page"].'">'.$entry["title"].'</a></li>';
break;
}
}
}
I know this is bad, but i am looking for something like this that when you call the function it do work like it would normaly do.