PDA

View Full Version : double exploding strings and looping them


Tekton
09-15-2004, 05:16 AM
Ok... here goes. :)

Let's say every user has a string... and looks something like...

1443x2.64x7.15903x30

What I need to do is split them by exploding them once by the .'s A value of 1443x2 means that the user has 2 of the object 1443. So I need to somehow split it again and then be able to search through and still be able to match them up later... Really confusing. I could just explode it, but I need some sort of for-or-while loop to cycle each explode and look for the values.

Can anyone help me get started at least? :P

What I have:


$checker = explode(".", $bbuserinfo[stock]); // seperates them all by the periods.

// loop to check and find a certain one needed HERE



I guess another option would be to make another table in the database to handle this...