How can you insert javascript in php code?

Answer Posted / vivek srivastava

You can write Java Script in PHP in a very simple way so as
I did:

<?php
some php code...
?>

<script type="text/javascript">
function someFun()
{
function code....
}
</script>

<?php
some php code...
?>

Is This Answer Correct ?    72 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is variable name casesensitive in php?

549


What is php addslashes?

545


How be the result set of mysql handled in php?

585


What is namespace in php?

557


How can we make a constant in php?

554






How do I end a php session?

507


what is the use of include_once in php?

533


What is final class and final method?

569


How we get ip address of client, previous reference page etc?

562


How to return a value back to the function caller?

556


How to find a substring from a given string in php?

505


What is the super method?

560


Does php use html?

475


What does the unset() function means?

589


Which variable declarations within a class is invalid in php?

505