Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php to call javascript function

echo '<script type="text/javascript">',
     'jsfunction();',
     '</script>'
;
Comment

call php function in js

<script>
  var phpadd= <?php echo add(1,2);?> //call the php add function
  var phpmult= <?php echo mult(1,2);?> //call the php mult function
  var phpdivide= <?php echo divide(1,2);?> //call the php divide function
</script>
Comment

how to call js function from php

<?php
 if(your condition){
     echo "<script> window.onload = function() {
     yourJavascriptFunction(param1, param2);
 }; </script>";
?>
Comment

PREVIOUS NEXT
Code Example
Php :: if session is empty laravel 
Php :: call function in php 
Php :: form validation for file type in codeigniter 
Php :: can we create linked list in php 
Php :: php submit form in new tab 
Php :: laravel eloquent relationships count 
Php :: whereHas site:https://laravel.com/docs/ 
Php :: cronjob php linux 
Php :: get post in php 
Php :: replace all occurrence char in string php 
Php :: file upload permission in php 
Php :: guzzle http client 
Php :: laravel 8 query builder 
Php :: get key of array element php 
Php :: php how to connect to db using PDO 
Php :: php return new object 
Php :: learndash edit profile link 
Php :: laravel apiresource 
Php :: php close unclosed HTML Tags 
Php :: phpspreadsheet CellProtection 
Php :: withdefault laravel 
Php :: php html template if conditions 
Php :: count_chars (PHP 4, PHP 5, PHP 7, PHP 8) count_chars — Return information about characters used in a string 
Php :: how to get attachments to emails php 
Php :: Laravel: Set timestamp column to current timestamp 
Php :: file_put_contents error in laravel 
Php :: how to read from temp files php 
Php :: laravel carbon time format 
Php :: recursive binary search php 
Php :: date_default_timezone_set php bangladesh 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =