0

how to code in php. using loop the output will be like this. ***** ***** ***** ***** ***** and *+*+* +*+*+ *+*+* +*+*+ *+*+* 😭😭😭

12th Jul 2016, 11:06 AM
Lenherij Oaba
Lenherij Oaba - avatar
3 Respostas
+ 4
<?php for($i=1;$i<=5;$i++){ for($j=1;$j<=5;$j++){ echo '*'; } echo '<br>'; } echo '<br>'; for($i=1;$i<=5;$i++){ for($j=1;$j<=5;$j++){ if($j%2==0){ if($i%2==0){ echo '*'; }else{ echo '+'; } }else{ if($i%2==0){ echo '+'; }else{ echo '*'; } } } echo '<br>'; } ?>
12th Jul 2016, 2:50 PM
Shashikant Chauhan
Shashikant Chauhan - avatar
0
two nesteds loops one for lines and the other for caractère
12th Jul 2016, 11:25 AM
Mohimi Othmane
Mohimi Othmane - avatar
0
thank you very much. ☺☺☺
12th Jul 2016, 3:18 PM
Lenherij Oaba
Lenherij Oaba - avatar