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 Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/83600-commas/#findComment-425336 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.