I am working with html / php and I would like to realize the following situation:
If I click on the "green" button, it should start a php function with the parameter startLoop(5)
If I click on the "red" button, it should start a php function with the parameter startLoop(10)
<?php
function startLoop($loops) {
for ($x = 0; $x < $loops; $x++) {
$array[] = $x;
}
return $array;
}
?>
the orange area should show the result of the call functions linke this:
<?php
/** orange Area - all values of the array **/
for ($x = 0; $x < count($array); $x++) {
echo $array[$x];
}
?>
and now is my problem, that i don't know, how I can realize it. This all should happen without a site reload.
Can anybody help me?