i have a code to create star combined with number, the result that i have like this:
1*****2*****3*****4*****5
and the source code:
<?php
$max = 5;
for ($i=1; $i<=$max; $i++){
for ($j=1; $j<=$max; $j++){
if ($i==$j){
echo "$j";
}
else{
//echo "<br>";
echo "*";
}
}
}
?>
<br />
and the result that i want like this:
1 * * * *
* 2 * * *
* * 3 * *
* * * 4 *
* * * * 5
How to add a new line on my code??