i'm using PHP to get some values from the Database & echo html code. So i have something like this..
$values = $params->get('something');
And then i want to pass $values in to the doSomething() function of javascript.
echo('<html>');
echo('<head>');
echo('</head>');
echo('<body>');
echo('<button type="button" onclick="doSomething()">');
echo('</button>');
echo('</br>');
echo('</body>');
echo('</html>');
Any suggestions? :D
You can do this -
echo('<button type="button" onclick="doSomething(\'' . $values . '\')">');
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments