Ok, I got that done, what do you guys recommend me doing next?
Functions with parameters and return values. You can pass values into functions, like this:
function average(%a, %b, %c, %d, %e){
return((%a + %b + %c + %d + %e) / 5);
}
echo(average(4, 6, 92, 84, 244));
This would echo the average of 4, 6, 92, 84, and 244, which is 86, in the console. Return basically makes a function act like a variable.
This code:
function getThree(){
echo("The number three");
return 3;
}
echo(getThree());
will echo "The number three" and return 3, which is passed into echo at the end.
Sorry if I didn't explain this well enough, I'm not too good at teaching.