Is it possible to include one function inside another? To learn functions, I\'m trying to create a combat sequence using PHP. The sequence would look like this:
If you want to define functions within function in PHP you can do it like this:
function a() { function b() { echo 'I am b'; } function c() { echo 'I am c'; } } a(); b(); c();
You must call the parent function first, then the functions inside.