How do i resolve "fatal error: maximum execution time exceeded" in php?

Example:

// A script that takes too long to execute, like a long loop.
This error indicates your script ran longer than the max_execution_time set in php.ini.

Solution:

// Increase the max_execution_time in php.ini or optimize your script.

Beginner's Guide to PHP