PHP Array and Compressing Data

Following example shows that use of an array to sort records in ascending and descending order using PHP program. <?php $arr = array(‘Apple’, ‘Zensor’, ‘MITIndia’); echo “<br><b>Without sorted values are..</b><br>”; echo $arr[0], “<br>”; echo $arr[1], “<br>”; echo $arr[2], “<br>”; echo “<br><b>Sorted values are..</b><br>”; sort($arr); $len=count($arr); for($i=0; $i<$len; $i++) { echo $arr[$i], “<br>”; } echo “<br><b>Reverse […]

Share

PHP Array and Compressing Data Read More ยป