How to write php function in html onclick?
Answer / Zia Ur Rehman
You can call a PHP function from HTML using JavaScript by attaching an event listener to the HTML element. Here's an example: `<button onclick='myFunction()'>Click me</button>` and then define your PHP function like this: `function myFunction() { <?php echo 'Hello, World!'; ?> }`
| Is This Answer Correct ? | 0 Yes | 0 No |
Write a program in php to reverse a number?
What is meant by an associative array?
Why do we use interface in php?
What is the difference between php and java?
Explain the purpose of output buffering in php.
Explain me what are the main error types in php and how do they differ?
Explain what are psrs? Choose 1 and briefly describe it?
What does the function get_magic_quotes_gpc() means?
Does empty check for null?
what server connected
How to remove duplicate values from php array?
Can we use get instead of post?