Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在循环时对东西进行排序
$arr = array('c','a''b'); foreach($arr as $alpha){ sort($alpha); echo $alpha."-"; }
它应该以 abc 结尾 如何完成?
$arr = array('c','a', 'b'); sort($arr); foreach($arr as $alpha) { echo $alpha . "-"; }
排序只需要调用一次。