Jump to content

[SOLVED] struggling with "if starts with" preg_match...


misterm

Recommended Posts

Hi

 

I wonder if anyone can help with this?

 

I am grabbing the URI of a page like:

 

$thisUri = $_SERVER['REQUEST_URI'];

 

Which works great. Once I have the set $thisUri to the current URI, I want to say if $thisUri starts with "/editor.php?cat=" then do something.

 

The format of the URI will always be like /editor.php?cat=1010000 with the number at the end constantly changing, which is the bit I want to ignore.

 

I've tried using preg_match, but I can't seem to get the syntax right.

 

I'm probably missing something really simple.  :/

 

Thanks to anyone who can point me in the right direction

 

mr m

 

 

 

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.