[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

SV: [PROGRAMMERING] Rekursion i php



> foreach ($array as $val)
> {
>    if($val[5] == 0)
>    {
>       #G¸r noget her når $far er 0
>    }
>}
 
Hmm.. Nu er der jo også "sønner" der kan være "fædre" tror ikke en løkke
er nok.
 
Ex. 
(Id, Far)
(1, 0)
           (3,1)
           (5,1)
(6,0)
           (2,6)
                      (7,2)
           (4,6)
 
Så man skal efter min overbevisning have fat i noget rekursion.
 
Jeg ville jo bare gerne have lidt performance også, således at man ikke
skal alle records igennem for hver enkel record. Altså [antal records]2.
Det kan hurtigt blive til mange.. Håbede at php have noget sql-agtig
select i arrays eller som min. at man kunne fjerne de rækker i arrayet
man allerede havde udskrevet på skærmen.
 
Hilsen Jan


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *