i have a problem i am a new in php and i need help
i just did a pageclass and i put the buttons in it
the problem now is how i suppose to make each button get into activate mode or class
my code..
Code: Select all
public $buttons = array (
"الصفحة الرئيسية" => "index.php",
"من نحن" => "about.php",
"إجتماعات" => "meetings.php",
"عظات" => "sermons.php",
"مقالات" => "articlaes.php",
"صور" => "albums.php",
"الكتاب المقدس" => "bible.php",
"راسلنا" => "contact.php",
);
$this->DisplayMenu($this->buttons);
public function DisplayMenu($buttons) {
?>
<div id="BannerBtn">
<ul>
<?php
foreach ($buttons as $title => $link)
echo "<li><a href='$link' >$title </a></li>";
?>
</ul></div>
i tried to use this code
<a href="$link" title="Welcome page"
<?php
if (
$page == '$link'
) {
?> class="ActivePageName"<?php } ?>
>$title</a>
soo what you think?