Phaelon Posted May 11, 2014 Share Posted May 11, 2014 Does anyone know how I can escape a decimal in a URL variable? I.E: example.com/?value=100.00 echo $_GET['value']; returns '', when I am wanting it to return '100.00'. I tried using quotes around 100.00 in the URL, but it didn't work. Quote Link to comment https://forums.phpfreaks.com/topic/288406-escaping-decimals-in-a-url-variable/ Share on other sites More sharing options...
Ch0cu3r Posted May 11, 2014 Share Posted May 11, 2014 You dont need to escape it. $_GET['value'] should be returning 100.00 You may need to post your code. Quote Link to comment https://forums.phpfreaks.com/topic/288406-escaping-decimals-in-a-url-variable/#findComment-1479067 Share on other sites More sharing options...
Cornelius Posted May 11, 2014 Share Posted May 11, 2014 Does it work correctly when program it to send letters instead of number? I.E: example.com/?value=hundred Quote Link to comment https://forums.phpfreaks.com/topic/288406-escaping-decimals-in-a-url-variable/#findComment-1479085 Share on other sites More sharing options...
Barand Posted May 11, 2014 Share Posted May 11, 2014 Why not just try it and see? echo $_GET['value']; Quote Link to comment https://forums.phpfreaks.com/topic/288406-escaping-decimals-in-a-url-variable/#findComment-1479090 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.