PHP 8.5.0 Alpha 1 available for testing

Voting

: eight minus eight?
(Example: nine)

The Note You're Voting On

anaz114119 at gmail dot com
14 years ago
sort from textfile by coloumn
example name||date||time||comments
if you want to sort by date
$column = 2
<?php
function array_sort($array,$column){
$column = $column-1;
foreach(
$array as $line){
$bits = explode("||",$line);
$bits ="$bits[$column]**$line";
$array1[]=$bits;
}
asort($array1);
foreach(
$array1 as $line){
$bit = explode("**",$line);
$bit ="$bit[1]";
$array2[]=$bit;
}
return
$array2;
}
?>

<< Back to user notes page

To Top