I have been working on a Garry's Mod loading screen recently and basically I was attempting to 'simplify' the map name by replacing it with a phrase. However, it appears PHP isn't printing the array value.
$map = $_GET["map"];
$map_list = array (
"gm_construct" => "Construct",
"gm_flatgrass" => "Flatgrass"
);
if (in_array($map, $map_list) == true)
{
if ($map == $map_list[1])
{
print("<script>document.getElementById('map_name').innerHTML = '" . print($map_list['gm_construct']) . "'</script>");
}
else if ($map == $map_list[2])
{
print("<script>document.getElementById('map_name').innerHTML = '" . print($map_list['gm_flatgrass']) . "'</script>");
}
}