spliting string into structured 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
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

spliting string into structured string

Post by pelegk2 »

i want to do something like this :
for example i have a lost of permission as starts as a string :
1,3,6,8,22,56,89
and i dont want to do a loop which will build me a query like this L:
id=1 or id=2 or id=6......
can i do this in once command in php?
i think i saw something similar in php but i am not sure
thanks in advance
peleg
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

:arrow: [mysql_man]IN[/mysql_man]
Post Reply