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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.