How can I evaluate the following string into multiple objects? at the moment it just does the first then ignores the rest, Ignore the PHP, this is generated via PHP, that being the reason I need to eval it so that I can use it as the options for a jQuery plugin.
{
latLng:['.$result->lat.','.$result->lon.'],
options:
{
shadow:
{
url: "'.BASE_URL.'css/png/markerBg.png",
scaledSize:
{
width:40,
height:43.5
}
},
icon:
{
url: "'.$result->user->profileImage.'",
scaledSize:
{
width:32,
height:32
},
anchor:
{
x: 16,
y: 40
}
}
}
},
{
latLng:['.$result->lat.','.$result->lon.'],
options:
{
shadow:
{
url: "'.BASE_URL.'css/png/markerBg.png",
scaledSize:
{
width:40,
height:43.5
}
},
icon:
{
url: "'.$result->user->profileImage.'",
scaledSize:
{
width:32,
height:32
},
anchor:
{
x: 16,
y: 40
}
}
}
},
{
latLng:['.$result->lat.','.$result->lon.'],
options:
{
shadow:
{
url: "'.BASE_URL.'css/png/markerBg.png",
scaledSize:
{
width:40,
height:43.5
}
},
icon:
{
url: "'.$result->user->profileImage.'",
scaledSize:
{
width:32,
height:32
},
anchor:
{
x: 16,
y: 40
}
}
}
}