php - html inside javascript not working -


I have some javascript code to show values ​​from mysql database.

  column: [[Text: 'taal', datafield: 'taal', width: 50}, {text: 'titel', datafield: 'title', width: 690}, { Text: 'website', datafield: 'sitenam', width: 180}, {text: 'Ingezonden Door', datafield: 'gamer_int', width: 150}, {text: 'data', datafield: 'data', width : 100}]  

When we look at the first column of the name "code", then the mysql database contains values ​​such as eng_ico.png . What I want, something like this is that the results can be displayed in the picture.

  column: [{text: 'tal', datafield: "& lt; img src = \" http: // www. Site: null_images/ "'taal'" \ "& gt; Width: 50}, {Text: 'Title', Datafield: 'Title', Width: 690}, {Text: 'Website', Data Field: 'Data', width: 100}] {text: 'Ingezonden Door', datafield: 'gamer_int', width: 150}, {text: 'data', datafield: 'data', width: 100}]  / Ex> 

I can not get this right, I do not know what I am doing. I tried ". Like the "Rhythm" ", there is no success on PHP.

First of all, your string There was no end speech mark, and the merge is slightly different for PHP, using + instead of . (I need to escape the need to escape with backslash I also use single quotes to do this)

  'img src = "http://www.site.nl/images/'+taal+'" & gt;  

Comments