Php: php output hollow diamond: $ a5; * control the number of loop rows * for ($ i1; $ I ;}for ($ I $ php output hollow diamond:
$ A = 5;/* control the number of loop rows */for ($ I = 1; $ I <= $ a; $ I ++) {for ($ B = 1; $ B <= $ a-$ I; $ B ++) {echo "" ;}for ($ c = 1; $ c <= ($ i-1) * 2 + 1; $ c ++) {if ($ c = 1 | $ c = ($ i-1) * 2 + 1) {echo "*";} else {echo "" ;}} echo"
";}For ($ I = $ A-1; $ I >=1; $ I --) {for ($ B = 1; $ B <= $ a-$ I; $ B ++) {echo "" ;}for ($ c = 1; $ c <= ($ i-1) * 2 + 1; $ c ++) {if ($ c = 1 | $ c = ($ i-1) * 2 + 1) {echo "*";} else {echo "" ;}} echo"
";}
Output result:
'). AddClass ('pre-numbering '). hide (); $ (this ). addClass ('Has-numbering '). parent (). append ($ numbering); for (I = 1; I <= lines; I ++) {$ numbering. append ($ ('
'). Text (I) ;}; $ numbering. fadeIn (1700) ;}) ;}; script
The above introduces the php output hollow diamond, including the php content, hope to be helpful to friends who are interested in the PHP Tutorial.