PHP/Data Structure/rsort

Материал из Web эксперт
Версия от 10:02, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

rsort() function sorts the elements in reverse order.

   <source lang="html4strict">

Its syntax is: void rsort (array array) <?

   $cities = array ("A", "N", "R", "V", "A");
   rsort($cities);
   print_r($cities);

?>

 </source>
   
  


rsort.php

   <source lang="html4strict">

<?php $states = array("Ohio","Florida","Massachusetts","Montana"); sort($states); print_r($states); ?>

 </source>