Jump to content

splitting a string on "/" with preg_split in php does not seem to work?


helloise

Recommended Posts

please explain what you are trying to accomplish, your pattern is not a valid pregex pattern. If you are trying to split a string by the forward slash then use explode() instead.

 

i.e.

   $user = $_SESSION['id'];
   print_r(explode('/' , $user));

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.