So here is my question. Can i somehow put this Onclick event that gives Javascript function variable $i from Php without using javascript,as i want to get the number of clicked button. I know it has something to do with button name, but with that button name i only know how to see if button is clicked with isset (i don't know how to pass value if its clicked to function), i would like to do this entirely in php, but i am stuck here as i don't know what to do, any help would be appreciate.
<?PHP
$i=0;
foreach($test2 as $test)
{
$delete ="<INPUT TYPE=BUTTON OnClick='submit_btn(" . $i. ")' NAME='delete".$i."'VALUE='delete'>";
$i++;
}
?>
<script type="text/javascript">
function submit_btn(btnClick) // < -- How to do this in PhP
{
alert(btnClick); // echo would go here
}
</script>