Pass an array as parameter via URL param
There are plenty of pages out there describing how to pass an array to some server-side script. Most of them describe a single parameter, I'll build a table in MySql database containing each individual details for each clothing item, which all item will be displayed in a ordinary repeating thumbnails fashion, where when you click on a certain thumbnail it passes along a url parameter(recordID=#) so that the corrosponding page to filters out by the recordID, which works fine(to my knowledge). The values of the array is then displayed. So the methodology works, but is this the best way to do it ?
Re: Pass an array as parameter via URL param
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
)
)
Re: Pass an array as parameter via URL param
Well, it is about dinner time here, so I'll give you a quick one. The could be shorter, but this way it makes hopefully more sense to you. Haven't tested it. If the URL is longer, but this has the advantage, that $_GET{parameter} is an array from the beginning of the script and you don't need to do any splitting:
print_r($_GET);
Re: Pass an array as parameter via URL param
Are u sure that the IP adress ,default gateway and the DNS server adresses u are entering are right. I don't know how can i run a diagnostic test on my modem.I cant find anything in device manager except my dial up modem which is what am using now. Anyway its WAN Miniport PPPOE..and the modem is ADSL by ZTE coperation.