Jump to content

help in finding string position


houssam_ballout

Recommended Posts

Hello,I need help with the following:I had a dynamic variable in this form:XXXX-Y-A-B (which is called ID) XXXX is always fixed (character)Y is also a single characterA is an integerB is an integer I am quering a database that had list of that IDs , and I need to know the value of A each time (A could be 1, 2, 3, 11, 200....)Any help?Thanks

Link to comment
Share on other sites

or, you could use explode. http://php.net/manua...ion.explode.php you can explode on the '-' and then you would have the value of 'A' as the third index (2) of the returned array.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...