(笔记)
1 // str_pad(带填补的字符串,填补后的长度,填补字符串,填补位置) 2 $result=["7","6","8","4","3","23","27","9","5","19","10","21"]; 3 if($result){ 4 foreach ($result as $key => $value){ 5 $result[$key]=str_pad($value,2,0,STR_PAD_LEFT); 6 } 7 //$result =["07","06","08","04","03","23","27","09","05","19","10","21"]