dizzy1 Posted May 23, 2009 Share Posted May 23, 2009 Hi i am trying to simply do a java script call in php: echo"<a href='#' "; echo 'onclick="DOCALL("test1")";'; echo">test</a>"; Thanks In Advance Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 23, 2009 Share Posted May 23, 2009 echo '<a href="#" onclick="DOCALL(\'test1\');">test</a>'; Quote Link to comment Share on other sites More sharing options...
dizzy1 Posted May 23, 2009 Author Share Posted May 23, 2009 echo '<a href="#" onclick="DOCALL(\'test1\');">test</a>'; That worked but how do i putt a variable in thier like: echo '<a href="#" onclick="DOCALL(\'$ere\');">test</a>'; Quote Link to comment Share on other sites More sharing options...
jackpf Posted May 23, 2009 Share Posted May 23, 2009 echo '<a href="#" onclick="DOCALL(\''.$ere.'\');">test</a>'; Quote Link to comment Share on other sites More sharing options...
Axeia Posted May 23, 2009 Share Posted May 23, 2009 To avoid using a hard to read syntax it might be worth it reading up on sprintf Quote Link to comment Share on other sites More sharing options...
dizzy1 Posted May 24, 2009 Author Share Posted May 24, 2009 Cheers Lads Works Perfectly ;D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.