Richard Harb wrote:
Hi there,
Supposed I have an array of objects, like:
$this[$i]->property1
$this[$i]->property2
is there any 'cheap' way to sort the array according to the values of
property1?
http://www.php.net/usort
Example:
function cmp($a, $b)
{
if ($a->property1 == $b->property1) {
On Mon, Apr 05, 2004 at 05:03:17AM +0200, Richard Harb wrote:
> Hi there,
>
> Supposed I have an array of objects, like:
>
> $this[$i]->property1
> $this[$i]->property2
>
> is there any 'cheap' way to sort the array according to the values of
> property1?
>
Try array_multisort() ->
// cre
Hi,
Monday, April 5, 2004, 1:03:17 PM, you wrote:
RH> Hi there,
RH> Supposed I have an array of objects, like:
$this[$i]->>property1
$this[$i]->>property2
RH> is there any 'cheap' way to sort the array according to the values of
RH> property1?
RH> The only way I thought I would be able to acco
3 matches
Mail list logo