⊗ppPmSFLVI 274 of 447 menu

Loop and Variable Interpolation in PHP

Variable interpolation into strings is also convenient to perform in loops:

<?php for ($i = 1; $i <= 5; $i++) { echo "xxx $i yyy"; } ?>

Simplify the following code:

<?php for ($i = 1; $i <= 10; $i++) { for ($j = 1; $j <= 10; $j++) { echo 'nums: ' . $i . ' ' . $j . '<br>'; } } ?>
byenru