I've been doing javascript for about a month and gotten fairly good if i do say so myself but I decided I wanted to convert the page I made that does physics projectile problems into php
basically i have this
<html>
<head>
<script type="text/javascript">
function inone(it) { 'use strict'; document.getElementById(it).style.display = 'none'; }
//note that I have many more functions like the one above im just using one as an example
function showY() { 'use strict'; inone('hidCa'); }
</script>
</head>
<body>
<input type="button" onclick="showY()">
</body>
</html>
I would like to know how to put do convert these to php but also for the inone function I would like a generic way to put the php variable created into a javascript command since I have so many similar functions e.g. document.getElementById(it).innerHTML=these;
I was think since the other code for the calculations are so big I would put the php tag write after the script tag and end it right before it closes