错误:需要一个标识符,而看到了'if'
<?php
ArrayDates ( [0] => 22/03/2018 [1] => 09/04/2018 [2] => 26/03/2018
[3] => 27/11/2017 [4] => 22/01/2018 [5] => 06/09/2017 )
?>
<script>
ArrayDates.sort(function (a, b){
var aa = a.split('-'),
bb = b.split('-');
return aa[2] - bb[2] || aa[1] - bb[1] || aa[0] - bb[0];
})
</script>