web - Passing arrays in the URL - compatible with standars and all browsers -
i want to pass parameters of variable (and not post), comply seo-url-friendly methodology. let's that
$models = array( 5000, 6001, 7777);
so pass parameters this:
http://www.example.com/gallery-display/?models%5b%5d=5000&models%5b%5d=6001&models%5b%5d=7777
in way can retrieve values directly by:
$models = $_get['models']; print_r($models);
alternatives of using char separator pipeline "|" and
http://www.example.com/gallery-display/?models=5000|6001|7777
and retrieving data by
$models = explode("|", $_get['models']); print_r($models);
is not desired, reasons not confessable here.
is first 1 reliable method, comply standars , can trusted in decent modern web broswer?
Comments
Post a Comment