Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

array sort php


<?php

$fruits = array("lemon", "orange", "banana", "apple");
sort($fruits);
foreach ($fruits as $key => $val) {
    echo $val;
}
/*
OUTPUT:
apple
banana
lemon
orange
*/
?>

Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #array #sort #php
ADD COMMENT
Topic
Name
7+6 =