Jump to content

matching all forward slashes


9three

Recommended Posts

Hi,

 

I'm trying to match the following:

 

preg_match('//', $_SERVER['REQUEST_URI'], $matches);

 

print_r($matches);

 

So that it looks like:

 

If REQUEST_URI is /dev/example/me

 

then it would match

->dev

->example

->me

 

etc

 

So I did '//' but its not working :-/ Can someone lend a hand? thanks.

Link to comment
https://forums.phpfreaks.com/topic/193031-matching-all-forward-slashes/
Share on other sites

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.