simonpearce
ISP
Hello,
I'm using the code below to check the URL of the current page to see if the word 'apple' appears. I would like to adapt it to check whether 'apple' OR 'banana' appears - what would I need to change?
<?php
$thispage = $_SERVER['REQUEST_URI'];
if (preg_match ("/apple/i", $thispage)) {
print "";
} else {
echo "not an apple of banana";
}
?>
I'm using the code below to check the URL of the current page to see if the word 'apple' appears. I would like to adapt it to check whether 'apple' OR 'banana' appears - what would I need to change?
<?php
$thispage = $_SERVER['REQUEST_URI'];
if (preg_match ("/apple/i", $thispage)) {
print "";
} else {
echo "not an apple of banana";
}
?>