0

I need to place following code inside php code of my submission button, in order to be able to track clicks. onClick="_gaq.push(['_trackEvent', 'test', 'test',,, false]);" The code I need to put it into looks like this <input id=”contact-submit” class=”button” type=”submit” value=”Submit” onClick="_gaq.push(['_trackEvent', 'test', 'test',,, false]);"> The problem is the "'" marks which seem to break the code. How can I print this marks inside code? Thank you

1
  • You know that is not a valid quote character, right? Commented Aug 26, 2012 at 17:51

1 Answer 1

1

escape them using \ backslash

echo '<input id="contact-submit" class="button" type="submit" value="Submit" onClick="_gaq.push([\'_trackEvent\', \'test\', \'test\',,, false]);">';
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.