if ($source=="test") {
header("Location: $testurl['google']");
}
This is supposed to redirect to google.com if the url is example.com/redirect.php?source=test but it doesn't work. If I change the array key to 1 and change the location to $testurl[1] it does works. Why does it work with indexed but not associative arrays?
if ($source=="test") { $url = $testurl['google']; header("Location:$url"); }