Jump to content

string split


jagguy

Recommended Posts

Hi,

 

I am recieving  a POST variable with numbers seperated by underscores in this format eg

 

2_19  or 1_2_12 etc of variable length but usually no more than a few underscores between each number.

 

How can i extract the numbers from this string as I have looked at substr but this requires knowing the exact length of the numbers.

If i don't know the size and numbers before hand what can i do to get the numbers seperated by underscore on their own?

Link to comment
https://forums.phpfreaks.com/topic/44100-string-split/
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.