[SOLVED] removing , from a string

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
robster
Forum Contributor
Posts: 360
Joined: Wed Jul 16, 2003 8:28 am
Location: Sunshine Coast, Australia

[SOLVED] removing , from a string

Post by robster »

Hello forum :)

I've got data coming in from a GET form that comes in like this example:

5, 14, 6, 33, 1

I want to be able to parse through a string similar to that, take the numbers (they will always be integers) and use them one at a time in a loop to access the database (the numbers represent the ID's of the database items).

Can anyone give me some guidelines, starting points etc? It's the comma's that are getting me at first thought, then their actual use in the loop.

Thanks a lot, I look forward to this one with interest :)
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

User avatar
robster
Forum Contributor
Posts: 360
Joined: Wed Jul 16, 2003 8:28 am
Location: Sunshine Coast, Australia

Post by robster »

you da man man :)

Thanks!
Post Reply