Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 13
Can i use javascript in php?
12 Respostas
+ 15
Why would you want to use js in phpššš... Are trying to make a bomb or something
+ 13
Both are Scripting Language..šš
+ 13
Nonnnnnnnn ššššš
+ 11
Lol
+ 10
No, i just want to knowšš
+ 10
Hahahaha, a useless activityš¤£š¤£
+ 10
I did. I was tried to use PHP in JS lol
+ 8
hahahašš¤£
+ 7
<?php
$user_type = app_user_type();
$js_code =<<<JS
<script language="JavaScript">
if(comment = prompt("Please tell me why would you want to use JS inside PHP?"){
alert("Hahahahahahaha, {$user_type} ā + comment);
}
else{
alert("Good Luck my Friend!");
}
</script>
JS;
?>
+ 7
PHP it's scripting language
+ 4
Yes, you can use javascript and php on the same website.
If you want to put javascript code in a php script use this
echo "javascript code here";
+ 1
what is a php