for loop syntax store database php and print html code example Example: php for loop for($i = 0; $i <=10; $i++){ echo "The index is $i"; }