Sorting php data var

后端 未结 2 1603
逝去的感伤
逝去的感伤 2021-01-29 01:17

UPDATE: Ok, thanks everyone. But, when I replace var with $ i now get these errors:

array_multisort()[function.array-multiso

2条回答
  •  南方客
    南方客 (楼主)
    2021-01-29 01:35

    var mostPoints = max($points);
    

    Have you been using JavaScript a lot lately (or old PHP 4 OO)?

    PHP's only use of the var keyword was for old PHP4 style object property definitons.

    Drop the var part.

    Also, don't forget the PHP variable sigil $.

提交回复
热议问题