verdrm Posted December 29, 2007 Share Posted December 29, 2007 Can someone explain briefly the function of numbers/commas after a question mark? Example: script.php?0,100 Link to comment https://forums.phpfreaks.com/topic/83600-commas/ Share on other sites More sharing options...
wildteen88 Posted December 29, 2007 Share Posted December 29, 2007 With that I'd expect they might be using mod_rewrite so they'll have a shorter url, eg: The above url might be rewritten as the following url with mod_rewrite: site.php?var1=0&var2=100 Or you could just use $_SERVER['QUERY_STRING'] to get everything after the question mark then use explode to get the separate numbers, eg: list($var1, $var2) = explode(',', $_SERVER['QUERY_STRING']); echo $var1; // 0 echo $var2; // 100 Link to comment https://forums.phpfreaks.com/topic/83600-commas/#findComment-425336 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.