I have an error when I escaping string
- by Sudip Rooj
I am trying to write a string in my php code in my panel.
This is given bellow
<?php
$str.="$('#layerList ul').prepend('<li data-refInd=\''+arr_ind+'\'><img src=\''tmp_card_imgs/\'+temp".$k.".name+'\' width='20px' /> Layer '+temp".$k.".zindex+':Image <span class=\'del_layer\' style=\'cursor:pointer;float:right;display:block;\'>X</span></li>');";
?>
but the error showing in console is given bellow
SyntaxError: missing ) after argument list
[Break On This Error]
...data-refInd=\''+arr_ind+'\'><img src=\''tmp_card_imgs/\'+temp0.name+'\' width='2...
-----------------------------------------|
editor.php?id=129 (line 837, col 60)
What is the problem in my string escaping?