how to call javascript with params function inside php echo code example
Example: php echo call javascript function with parameters
// Most effective way to call a javascript function with parameter of PHP variable
echo '<input type="button" value="Button" onclick="return openEditor(\'' . $path_image . '\')">';