Split or explode will work fine, but you don`t need a loop to query your database. If you're working in JavaScript there are a couple of reasons why you might want to be able to do this, firstly if the pages of your site are being dynamically generated based on user input in a form then you can make a static link from another part of your site or from another site, for example if you're using a JavaScript search system you can link to the search results for a particular term.
Code:
Array
(
[parameter] => Array
(
[0] => 1
[1] => 2
[2] => 5
[3] => 3
)
)
Bookmarks