Re: [PHP] recursive function

2008-05-24 Thread Per Jessen
Manuel Pérez López wrote: > Hello everyone: > > Is it possible to do recursive this function? > > I can write it so linear. But only a finite number of loops. Please explain which problem you're trying to solve - it'll be easier to determine whether your problem has a recursive solution or not

[PHP] recursive function

2008-05-24 Thread Manuel Pérez López
Hello everyone: Is it possible to do recursive this function? I can write it so linear. But only a finite number of loops. Thanks. Manuel Perez This is: function ($field, $arr_secuence_reverse) { if (count($arr_secuence_reverse) == 1) { return getPrimaryKey4

Re: [PHP] Recursive function for array task?

2007-04-27 Thread Stewart Macdonald
Thanks! I don't understand how it works, but it does! That's the main thing! I've been pulling my hair out over this for the last two days. You're a legend! Thanks again, Stewart On 27/04/2007, at 8:28:41 PM, [EMAIL PROTECTED] wrote: First versions got a bug, i did not merged the groups w

Re: [PHP] Recursive function for array task?

2007-04-27 Thread [EMAIL PROTECTED]
First versions got a bug, i did not merged the groups when found a pair which should connect them. This one is better: array('X'), "C" => array('Q','K'), "D" => array('M'), "F" => array('V'), "G" => array('N'), "I" => array('X','M'), "K" => array('C'), "M" => array(

Re: [PHP] Recursive function for array task?

2007-04-27 Thread Stewart Macdonald
On 27/04/2007, at 7:57:45 PM, Edward Kay wrote: Interesting problem. I've got a few ideas but please could you clarify what you want as the output? Is it just an array of the groups, i.e. Array ( [0] => 'B,X,I,M,V,F,D' [1] => 'C,Q,K' [2] => 'G,N' [3] => 'R,U' )

Re: [PHP] Recursive function for array task?

2007-04-27 Thread [EMAIL PROTECTED]
What you want is strange... but this is the solution array('X'), "C" => array('Q','K'), "D" => array('M'), "F" => array('V'), "G" => array('N'), "I" => array('X','M'), "K" => array('C'), "M" => array('I','V'), "Q" => array('C'), "R" => array('U'), "V" =>

RE: [PHP] Recursive function for array task?

2007-04-27 Thread Edward Kay
> -Original Message- > From: Stewart Macdonald [mailto:[EMAIL PROTECTED] > Sent: 27 April 2007 10:13 > To: php-general@lists.php.net > Subject: [PHP] Recursive function for array task? > > > Hi all, > > I've got a bit of a logic problem that I can&

[PHP] Recursive function for array task?

2007-04-27 Thread Stewart Macdonald
Hi all, I've got a bit of a logic problem that I can't figure out. I've got an array: Array ( [B] => X [C] => Q,K [D] => M [F] => V [G] => N [I] => X,M [K] => C [M] => I,V [Q] => C [R] => U [V] => M [X] => I ) This array shows groupings of object

Re: [PHP] recursive function problem

2006-12-07 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-12-08 10:59:51 +1100: > Roman Neuhauser wrote: > ># [EMAIL PROTECTED] / 2006-12-07 13:41:00 +0100: > >>I wrote a recursive function, but when running the function appache > >>stalls, the error log says: > >> > >>module mod_php4.c is already running, skipping > > > >T

Re: [PHP] recursive function problem

2006-12-07 Thread Chris
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-12-07 13:41:00 +0100: I wrote a recursive function, but when running the function appache stalls, the error log says: module mod_php4.c is already running, skipping That has nothing to do with the function call. Is this a bug, or am I

Re: [PHP] recursive function problem

2006-12-07 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-12-07 13:41:00 +0100: > I wrote a recursive function, but when running the function appache stalls, > the error log says: > > module mod_php4.c is already running, skipping That has nothing to do with the function call. > Is this a bug, or am I doing something wr

RE: [PHP] recursive function problem

2006-12-07 Thread sjef janssen
n: Sjef CC: php-general@lists.php.net Onderwerp: Re: [PHP] recursive function problem On Thu, 2006-12-07 at 13:41 +0100, Sjef wrote: > Hello! > I wrote a recursive function, but when running the function appache stalls, > the error log says: Did you write a recursive function to send thi

Re: [PHP] recursive function problem

2006-12-07 Thread Paul Scott
On Thu, 2006-12-07 at 13:41 +0100, Sjef wrote: > Hello! > I wrote a recursive function, but when running the function appache stalls, > the error log says: Did you write a recursive function to send this mail to this list perhaps? --Paul All Email originating from UWC is covered by disclaimer

[PHP] recursive function problem

2006-12-07 Thread Sjef
Hello! I wrote a recursive function, but when running the function appache stalls, the error log says: module mod_php4.c is already running, skipping Is this a bug, or am I doing something wrong? Thanxs, Sjef -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www

[PHP] recursive function problem

2006-12-07 Thread Sjef
Hello! I wrote a recursive function, but when running the function appache stalls, the error log says: module mod_php4.c is already running, skipping Is this a bug, or am I doing something wrong? Thanxs, Sjef -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www

Re: [PHP] recursive function problem

2006-12-07 Thread Jochem Maas
Sjef wrote: > Hello! > I wrote a recursive function, but when running the function appache stalls, > the error log says: > > module mod_php4.c is already running, skipping this error message is from the apache start up routine - you seem to loading the php4 apache module twice. fix you apache co

Re: [PHP] recursive function problem

2006-12-07 Thread T . Lensselink
If you show some code maybe somebody on the list can help you. On Thu, 7 Dec 2006 13:41:00 +0100, "Sjef" <[EMAIL PROTECTED]> wrote: > Hello! > I wrote a recursive function, but when running the function appache > stalls, > the error log says: > > module mod_php4.c is already running, skipping >

[PHP] recursive function problem

2006-12-07 Thread Sjef
Hello! I wrote a recursive function, but when running the function appache stalls, the error log says: module mod_php4.c is already running, skipping Is this a bug, or am I doing something wrong? Thanxs, Sjef -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www

[PHP] Recursive function and formatting string for javascript tree

2005-05-24 Thread Charles Kline
Hi all. I can't seem to figure this one out. I am trying to output a string for a javascript that builds a DHTML tree. The sample string looks like this: [ ['Executive Director', null, null, ['Executive Assistant ', null, null], ['Operations Director', null, null,

[PHP] recursive function not returning anything..

2004-11-07 Thread nate
function recursePathLookup($CatID, $Path = array()) { //Get the catid for this subcat $sql = "SELECT SubCategoryID, Name FROM categories WHERE CategoryID = '".$CatID."'"; $query = mysql_query($sql); if(mysql_num_rows($query) == 1) { $data = mysql_fetch_array