0
how to code in php. using loop the output will be like this. ***** ***** ***** ***** ***** and *+*+* +*+*+ *+*+* +*+*+ *+*+* đđđ
3 Answers
+ 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>';
}
?>
0
two nesteds loops
one for lines and the other for caractĂšre
0
thank you very much. âșâșâș