phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] StyleGuide


From: Lars Kneschke(priv.)
Subject: Re: [Phpgroupware-developers] StyleGuide
Date: Tue, 27 May 2003 12:56:42 +0000

Dave Hall <address@hidden> schrieb: 
>> 2) The last entry of $history is always the value of 
>> $_GET['click_history']the $history  appsession seems to become 
>> very big after a while - could 
>> it be reduced to only the last (few) entries ?
>> 
>
>Sure ... but i am not sure how to do this without causing a major
>performace hit.  Any ideas?

$queue = array ("orange", "banana");
array_unshift ($queue, "apple", "raspberry");

this will become 

Array
(
    [0] => apple
    [1] => raspberry
    [2] => orange
    [3] => banana
)

So you can always put the new "last url"  on top.

$queue = array_slice($queue, 0, 3);

will return only 4 entrys.

Don't know how fast it is, but this are only 3 lines.

CU
--
written with FeLaMiMail







reply via email to

[Prev in Thread] Current Thread [Next in Thread]