发布于2018年4月20日2018年4月20日 由wangfei打印倒三角 $len =10; $str = '*'; for($i=0;$i<$len;$i++){ echo sprintf("%'${str}${len}s",str_pad("",$i," "))."\r\n"; }