Reputation: 69
I never saw this till now example
$test="×tamp";
echo $test;
will output xtamp
if I put capital T
then is correct
I try like
$url = "https://maps.googleapis.com/maps/api/timezone/json?location=".$latitude. ",".$longitude. "&".$test. "=".$date."&key=";
$url = "https://maps.googleapis.com/maps/api/timezone/json?location=".$latitude. ",".$longitude. "×tamp=".$date."&key=";
This is output I get
https://maps.googleapis.com/maps/api/timezone/json?location=44.786568,20.4489216xtamp=1445364621&key=
Upvotes: 1
Views: 451
Reputation: 21
× means a multiplication sign. (Technically it should be × but lenient browsers let you omit the ;.)
Same response here: Using "×" word in html changes to ×
If you use ('') maybe the PHP doesn't convert the × to x
Upvotes: 2
Reputation: 4592
$test
is not escaped, so it's seeing × as s special character(x)
$query = array(
'location' => '',
'timestamp' => '',
'key' => ''
);
$url = "https://maps.googleapis.com/maps/api/timezone/json?" . http_build_query($query);
Upvotes: 2