Conditional that looks at URL Im attempting to wrap my secondary links in an if statment that looks at the URL and only displayes them if URL is work/*.

The secondary links are only related to work but show on every page so i am trying to emove on any path that is not work/*. The secondary links are within my page.tpl

Ive been tryin with this but no joy.

 &lt;?php  if ($the_url = explode('/', urldecode(request_url('work')))):?&gt;
         &lt;div id="secondary-links-wrap"&gt;&lt;?php if (!empty($secondary_links)){ print theme('links', $secondary_links, array('id' =&gt; 'secondary', 'class' =&gt; 'links sub-menu')); } ?&gt;&lt;/div&gt;
&lt;?php endif; ?&gt;


Any help would be much appretiated.

Thank you
Try this:

$request_array = explode('/', request_uri());
if (in_array('work', array_values($request_array))) {
  //execute your custom code
}