on-internet
← Community

How to properly quote javaScript function in PHP echo

Stack Overflow ·

Please can someone assist, I am getting an error that has to do with improper string quoting in a PHP script below. I have tried rearranging the quotes to single quote and also using the back slash but it's not working. The error is "Parse error: syntax error, unexpected identifier "A26" in ...." <?php function abc(){ $as = "<input type='date' id='B26' name='lastdate' class='form-control' onblur='futureDate(this, "A26" , "B26")' required>"; return $as; }

Comments

Sign in or sign up to comment and upvote.

No comments yet.