I'm new with HTML, PHP, JS, and CSS. I just want to know if you can use PHP functions in JS. I have little experience with JS.
Please knowtify me if it can be done.
You can call PHP functions from Javascript with an XHTTP request you want to look into AJAX for that but I would suggest you learn both languages before attempting that.
// .... here some php lins... variables o some functions....
//... maybe some post variables an some new values.... proccessed over post variables....
<script type="text/javascript">
function test(){
document.getElementById("php_code").innerHTML="<?php for($i=0; $i<10; $i++) echo $i; //maybe a function ?>";
}
</script>
<a href="#" style="display:block; color:#000033; font-family:Tahoma; font-size:12px;" onclick="test(); return false;"> test </a>
<span id="php_code"> </span>
Do one thing, read AJAX carefully and learn how to call javascript withing php. PHP doesn't provide support from outside so it could be better if you do all thing in .ASP.