//this code works correctly $map->addAddress($mapitstring, "Name of this city"); //this code does not $map->addAddress($mapitstring, $mapitname); where $mapitname contains the text Name of this city, as verified by var_dump I need the variable to be enclosed in quotes exactly as in example 1 for this to work properly