Hi all!
I have a page on my website called sidebar.php.
It runs my sidebar on my webpages.
It checks what the current page is the browser is viewing using:
$page = $_SERVER['SCRIPT_NAME'];
and then I have an array with all the pages that will display the same sidebar. This for example is my About Us Pages:
$about_pages = array("/New/about-us/about.php",
"/New/about-us/team.php", "/New/contact.php");
How do I write an IF Statement to compare the array entries with the $page variable?
I tried this but it wasn't working:
if($page == $about_pages)
{
// Content goes here
}
I know its something super easy and thats why I posted it in the newbies! Thanks for the help!