Problem with appending strings + vars

Problem with appending strings + vars

Okay so I need to append 
<li data-rel="close" data-gmapping='{"id":"m_1","latlng":{"lat":50.708664,"lng":-1.286839},"tags":"drupal"}'>

That to my HTML I know all the code for that already. The problem is I need to add to variables in

<li data-rel="close" data-gmapping='{"id":"m_1","latlng":{"lat":ONE HERE,"lng":THE OTHER HERE},"tags":"drupal"}'>

And when I try do it I just get errors and can't the problem is I can't work with all the ' s and "s that already exist in there but they need to be there