hai
I want to give a javascript variable within a double Quotes , Can any one help me?
hai
I want to give a javascript variable within a double Quotes , Can any one help me?
Have you tried using \ in front of the double quotes to escape the character?
var myVar="this is my text in \"double quotes\"";
Use json_encode()
:
var myString = <?=json_encode('This is a "test".');?>;
I think you're talking about string concatenation. If so, it's like:
a = "word";
b = "there should be another " + a + " in the middle of this string.";