Ultragames
10-20-2004, 04:05 AM
Not sure what to name this thread realy. I have a string. It might say "ORDER", or it might say something like "ORDER x2" or "ORDER x13"
How can i strip off the space, x, and the number, so i can put new ones on with a new number? I can't just change the number, because if they make the number 1, then i want to remove the space, x and number all together.
(I wouldn't even know how to change just the number)
I am pulling these strings out of an array, and then adding the numebr to them, but if the number is already there, i want to change it, so i don't end up with something like "ORDER x2 x3 x4 x8 x17" if the user can't make up their mind.
I have looked through all of PHPs string functions, and from the explinations given, i can't find anything that will do this. Please help.
Thanks for your help.
How can i strip off the space, x, and the number, so i can put new ones on with a new number? I can't just change the number, because if they make the number 1, then i want to remove the space, x and number all together.
(I wouldn't even know how to change just the number)
I am pulling these strings out of an array, and then adding the numebr to them, but if the number is already there, i want to change it, so i don't end up with something like "ORDER x2 x3 x4 x8 x17" if the user can't make up their mind.
I have looked through all of PHPs string functions, and from the explinations given, i can't find anything that will do this. Please help.
Thanks for your help.