alxla
02-09-2007, 12:26 PM
I'm not a so experienced programmer in PHP, and now i have got stuck in a simple operator problem :rolleyes:
if ($page!="myheadisgone")
{
include("templates/head.tpl");
}
This script works just fine, but if i want to check if "$page" is'nt equal with multiple strings like to put them in a string or something like this:
$noheaderarray = array("myheadisgone", "idonothaveahead", "headless");
if ($page!=$noheaderarray)
{
include("templates/head.tpl");
}
So that the if statements test if $page isn't equal to any of the strings in "$noheaderarrray"
if ($page!="myheadisgone")
{
include("templates/head.tpl");
}
This script works just fine, but if i want to check if "$page" is'nt equal with multiple strings like to put them in a string or something like this:
$noheaderarray = array("myheadisgone", "idonothaveahead", "headless");
if ($page!=$noheaderarray)
{
include("templates/head.tpl");
}
So that the if statements test if $page isn't equal to any of the strings in "$noheaderarrray"