Hi there wondering if anyone can help,
I'm trying to check if the current URL contains a set of characters and if so echo a div.
So far I have the following working:
<?php if (stripos($_SERVER['REQUEST_URI'],'/blue-widgets/') !== false)
{echo "<div></div>" ;}
?>
But that code is checking for an absolute match for "/blue-widgets/" I think, I'd like to be able to echo the div if the URL contains just the text "-widgets", therefore it would appear if the url contained "red-widgets" or "yellow-widgets" and so on.
Anyone know if this is possible?
Many Thanks