php for loop for fixed number of times code example Example: php loop x times for ($i = 1; $i <= 10; $i++) { echo $i; }