I'm trying to figure out how i can use quotes in a third "layer".
Do i need to "escape" the quotes somehow?
PHP/JS/HTML
echo "<script type='text/javascript'>";
echo "$('#rImgObjNr').text('Bilder: ".$imgDirs[$randomDir]."<i class='fa'></i>');";
echo "</script>";
It's my icon element that has problems with it's quotes:
<i class='fa'></i>
When i use 'I "close" JS text.. and if i use " i close the PHP.
How can i solve this?
Can i use my HTML element inside of this PHP/JS text?
\"as in"your\"string\""which would outputyour"string". This works in Php and Js<i class=\'fa\'>.textto.htmlalso.