i have problem with unterminated string constant.
here is my code in PHP:
'html' => '<div><table><td><tr><img src="' . "http://www.simbawave.com/_lib/file/img/hotel/$FolderHotel/$NamaFile" . '"width="200" height="200" /></tr><tr><p><b>'.$Hotel."</b></p></tr></td><td>$Alamat</td></table></div>",
and here is the HTML source (result, not all, it will be too long)
markers[8] = new google.maps.Marker({
icon: "http://www.simbawave.com/MapBlueIcon/villa.png",
title: "Bali Dynasty Resort",
position: new google.maps.LatLng(-8.747509, 115.16764),
map: map
});
infos[8] = new google.maps.InfoWindow({
content: "<div><table><td><tr><img src=\"http://www.simbawave.com/_lib/file/img/hotel/HO-00009/depan2web.jpg\"width=\"200\" height=\"200\" /></tr><tr><p><b>Bali Dynasty Resort</b></p></tr></td><td> Jln. Kartika Po Box 2047
Tuban 80361
South Kuta
Bali - Indonesia</td></table></div>"
});
if i remove the variable $Alamat
, it will be fine, no problem. but i ad $Alamat, i don't have any idea what's wrong with my PHP code.
The value of $Alamat
is like that (string/varchar):
Jln. Kartika Po Box 2047
Tuban 80361
South Kuta
But in HTML view, it is shown only:
Jln. Kartika Po Box 2047
I thought there should be some characters are missing when passing to HTML.
Tuban 80361
South Kuta
Bali - Indonesia</td></table></div>
I thought those are the characters were not passed and make this error because the $Alamat
contains multi lines not a single line while $Hotel
contains a single line of string.
Anyone know how to make this varchar multi lines can be used in PHP?