Jump to content

$GET['my.foo']


MadTechie

Recommended Posts

ok a simple question i hope

 

i need to pass a get string but the variable requires a dot (.) but php converts this to a underscore (_) this normally wouldn't be a problem but some variables use the underscore

 

heres some basic code

 

url = index.php?my.foo=hello&my_foo2=world

<?php

print "my.foo:".$_GET['my.foo']."<br />";
print "my_foo:".$_GET['my_foo']."<br />";
print "my_foo2:".$_GET['my_foo2']."<br />";

print_r($_GET);

?>

 

any ideas how to resolve this, as a note the variable names are pulled in from a data file created by the user

Link to comment
https://forums.phpfreaks.com/topic/40642-getmyfoo/
Share on other sites

  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.