Need JavaScript var in anchor
- by Helto
I'm sure this is really simple, but I need some help.
I'm trying to insert a variable into an anchor in the following snippet
var tablerows = ''
$.each( data, function(index,row){
id = row.shift()
tablerows += '<tr><td><a href="getuserimage.php?id=" target="_blank">' + row.shift() + '</a></td>'
tablerows += '<td>' + row.join('</td><td>') + '</td></tr>'
})
$("#users-table > tbody").html(tablerows)
I'm just not sure how to get the id in there