I have an error when I escaping string

Posted by Sudip Rooj on Stack Overflow See other posts from Stack Overflow or by Sudip Rooj
Published on 2013-07-03T10:45:08Z Indexed on 2013/07/03 11:05 UTC
Read the original article Hit count: 203

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript