[PHP] Recursion issue with Zend_Soap_AutoDiscovery.

2010-01-25 Thread Richard Quadling
Hi. I'm in the process of building a web service which incorporates the ability for the server to inform the client that a particular call has been superseded by another. So, cut down (I've removed all the other details), ... class ServiceDetails { /** * Superseded by

[PHP] Recursion And Serialization - Solved

2009-09-08 Thread Andrea Giammarchi
I do not know why php.net is not publishing yet the link I posted in specific page, but if you want to resolve serialized recursion problem or you just want to better understand the problem and possible solutions, you may be interested in this post:

Re: [PHP] Recursion... Sort of...

2008-05-09 Thread Stut
On 9 May 2008, at 02:02, Nathan Nobbe wrote: function doStuff() { static $callCount; if(!isset($callCount)) $callCount = 1; else $callCount++; /// do stuff w/ $callCount to potentially handle sub-tabs and stuff if($callCount == 2) { echo 'white on black'; } else { echo

Re: [PHP] Recursion... Sort of...

2008-05-09 Thread Nathan Nobbe
On Fri, May 9, 2008 at 1:52 AM, Stut [EMAIL PROTECTED] wrote: On 9 May 2008, at 02:02, Nathan Nobbe wrote: function doStuff() { static $callCount; if(!isset($callCount)) $callCount = 1; else $callCount++; /// do stuff w/ $callCount to potentially handle sub-tabs and stuff

Re: [PHP] Recursion... Sort of...

2008-05-09 Thread Matt Neimeyer
Wow! Thanks guys! Here's what I ended up doing... To get... Black on White - 1 White on Black - 2 Black on White - 3 Black on White - 3 White on Black - 2 Black on White - 3 I had to do something like... function doStuff() { static $callCount = 0; $callCount++;

Re: [PHP] Recursion... Sort of...

2008-05-09 Thread tedd
At 5:48 PM -0400 5/8/08, Matt Neimeyer wrote: Is there a way to tell if a function has been called that has resulted in a call to the same function? We have an in-house CRM app that has a function that draws a tabbed panel on a screen... BUT if there are sub-sub-tabbed panels we want to invert

[PHP] Recursion... Sort of...

2008-05-08 Thread Matt Neimeyer
Is there a way to tell if a function has been called that has resulted in a call to the same function? We have an in-house CRM app that has a function that draws a tabbed panel on a screen... BUT if there are sub-sub-tabbed panels we want to invert the tab colors and panel colors... So...

Re: [PHP] Recursion... Sort of...

2008-05-08 Thread Nathan Nobbe
On Thu, May 8, 2008 at 3:48 PM, Matt Neimeyer [EMAIL PROTECTED] wrote: Is there a way to tell if a function has been called that has resulted in a call to the same function? We have an in-house CRM app that has a function that draws a tabbed panel on a screen... BUT if there are

Re: [PHP] Recursion... Sort of...

2008-05-08 Thread Jim Lucas
Nathan Nobbe wrote: On Thu, May 8, 2008 at 3:48 PM, Matt Neimeyer [EMAIL PROTECTED] wrote: Is there a way to tell if a function has been called that has resulted in a call to the same function? We have an in-house CRM app that has a function that draws a tabbed panel on a screen... BUT if

Re: [PHP] Recursion... Sort of...

2008-05-08 Thread David Otton
2008/5/8 Matt Neimeyer [EMAIL PROTECTED]: Is there a way to tell if a function has been called that has resulted in a call to the same function? debug_backtrace() Can't comment on performance, though. Its an inelegant solution. We have an in-house CRM app that has a function that draws a

Re: [PHP] Recursion... Sort of...

2008-05-08 Thread Nathan Nobbe
On Thu, May 8, 2008 at 6:23 PM, Jim Lucas [EMAIL PROTECTED] wrote: Nathan Nobbe wrote: On Thu, May 8, 2008 at 3:48 PM, Matt Neimeyer [EMAIL PROTECTED] wrote: Is there a way to tell if a function has been called that has resulted in a call to the same function? We have an in-house CRM app

[PHP] Recursion and threaded message boards...

2007-08-10 Thread Tony Di Croce
I have to write some PHP backend code for a threaded message board. The db has a message table, and each message has a parent id. Does anyone have any advice for someone whos never done this in PHP? I'm currently thinking that I write function that takes a db row as an argument, and initially,

Re: [PHP] Recursion and threaded message boards...

2007-08-10 Thread Richard Davey
Hi Tony, Friday, August 10, 2007, 5:23:28 PM, you wrote: I have to write some PHP backend code for a threaded message board. The db has a message table, and each message has a parent id. Does anyone have any advice for someone whos never done this in PHP? I'm currently thinking that I

Re: [PHP] Recursion and threaded message boards...

2007-08-10 Thread Stephen
--- Tony Di Croce [EMAIL PROTECTED] wrote: I have to write some PHP backend code for a threaded message board. The db has a message table, and each message has a parent id. Does anyone have any advice for someone whos never done this in PHP? You are reinventing the wheel here. Why?

Re: [PHP] Recursion and threaded message boards...

2007-08-10 Thread Børge Holen
On Friday 10 August 2007 18:29, Stephen wrote: --- Tony Di Croce [EMAIL PROTECTED] wrote: I have to write some PHP backend code for a threaded message board. The db has a message table, and each message has a parent id. Does anyone have any advice for someone whos never done this in

Re: [PHP] Recursion and threaded message boards...

2007-08-10 Thread Richard Lynch
On Fri, August 10, 2007 11:23 am, Tony Di Croce wrote: I have to write some PHP backend code for a threaded message board. The db has a message table, and each message has a parent id. Does anyone have any advice for someone whos never done this in PHP? I'm currently thinking that I write

Re: [PHP] Recursion: Ugh!

2005-05-27 Thread Chris
Chris W. Parker wrote: Marek Kilimajer mailto:[EMAIL PROTECTED] on Thursday, May 26, 2005 11:35 AM said: untested: function display($array, $prefix = '') { echo $prefix ':' . $array['name'] . \n; if(is_array($array['children']) $array['children']) {

Re: [PHP] Recursion: Ugh!

2005-05-27 Thread Chris
Chris W. Parker wrote: Hi everyone, I've been working on a problem for a few days now and I'm not making any headway so I think it's time I come to the list for some help (though this really disappoints me since it appears I'm not capable of solving this problem on my own!). Anyway, I'm

Re: [PHP] Recursion: Ugh!

2005-05-27 Thread Chris
Chris W. Parker wrote: Hi everyone, I've been working on a problem for a few days now and I'm not making any headway so I think it's time I come to the list for some help (though this really disappoints me since it appears I'm not capable of solving this problem on my own!). Anyway, I'm using

Re: [PHP] Recursion: Ugh!

2005-05-27 Thread Steve Brown
Food:Fruit:Red Food:Fruit:Green Food:Fruit:Yellow Food:Vegetables:Long Food:Vegetables:Round Food:Vegetables:Round:Spikey Food:Vegetables:Round:Smooth How is your structure being built? Is it hard-coded or dynamic (e.g. pulled from a DB)? We employ a similar tree structure for manging

RE: [PHP] Recursion: Ugh!

2005-05-27 Thread Chris W. Parker
Steve Brown mailto:[EMAIL PROTECTED] on Thursday, May 26, 2005 11:47 AM said: How is your structure being built? Is it hard-coded or dynamic (e.g. pulled from a DB)? From a database. We employ a similar tree structure for manging items in our store front. Believe me when I say, its a

Re: [PHP] Recursion: Ugh!

2005-05-27 Thread Steve Brown
On 5/27/05, Chris W. Parker [EMAIL PROTECTED] wrote: Let's say you're entering a new product, you'd want to see a list of all the available categories, not just the last node of a branch. Not neccesarily; it depends on how big your tree structure is. If you only have 10 categories where an

Re: [PHP] Recursion: Ugh!

2005-05-27 Thread Steve Brown
** email gagging, sorry if this is a DP ** On 5/27/05, Chris W. Parker [EMAIL PROTECTED] wrote: Let's say you're entering a new product, you'd want to see a list of all the available categories, not just the last node of a branch. Not neccesarily; it depends on how big your tree structure is.

RE: [PHP] Recursion: Ugh!

2005-05-27 Thread Chris W. Parker
Steve Brown mailto:[EMAIL PROTECTED] on Friday, May 27, 2005 2:17 PM said: So in your case, if you wanted to create a new item in the category Round, you would first have to navigate to Food Vegetables Round, then create the new item. This may seem more complicated, but think about how

[PHP] Recursion: Ugh!

2005-05-26 Thread Chris W. Parker
Hi everyone, I've been working on a problem for a few days now and I'm not making any headway so I think it's time I come to the list for some help (though this really disappoints me since it appears I'm not capable of solving this problem on my own!). Anyway, I'm using the Modified Preorder

Re: [PHP] Recursion: Ugh!

2005-05-26 Thread Marek Kilimajer
Chris W. Parker wrote: Hi everyone, I've been working on a problem for a few days now and I'm not making any headway so I think it's time I come to the list for some help (though this really disappoints me since it appears I'm not capable of solving this problem on my own!). Anyway, I'm using

RE: [PHP] Recursion: Ugh!

2005-05-26 Thread Chris W. Parker
Marek Kilimajer mailto:[EMAIL PROTECTED] on Thursday, May 26, 2005 11:35 AM said: untested: function display($array, $prefix = '') { echo $prefix ':' . $array['name'] . \n; if(is_array($array['children']) $array['children']) { foreach($array['children'] as

Re: [PHP] Recursion: Ugh!

2005-05-26 Thread Rory Browne
This would have been easier if you'd posted the php code to create the array, as opposed to the output of print_r. I did this: ?php $arr = array( array( 'name' = 'food', 'children' = array( array( 'name' = 'meat',

[PHP] Recursion to sanitize user input

2004-10-08 Thread zooming
I'm trying to sanitize my user input. My sanitize function does not work if I send a variable that's an array. I'm using recursion to go through the array. The example below shows that $_POST['city'] works but $_POST['user'] doesn't work. The array comes back blank. Anyone see what's wrong

RE: [PHP] Recursion to sanitize user input

2004-10-08 Thread Yoed Anis
, not tested. Best, Yoed -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, October 08, 2004 5:15 PM To: [EMAIL PROTECTED] Subject: [PHP] Recursion to sanitize user input I'm trying to sanitize my user input. My sanitize function does not work if I send

Re: [PHP] Recursion to sanitize user input

2004-10-08 Thread Curt Zirzow
* Thus wrote Yoed Anis: Simple your code should look like this: ... if ( is_array($userInput) ) { foreach ( $userInput as $key = $value ) { return sanitize( $value ); // needed to return it or else its not recurssive This is wrong, only the

Re: [PHP] Recursion to sanitize user input

2004-10-08 Thread Robet Carson
it should be this i think: foreach ( $userInput as $key = $value ) { $newvalue[] = sanitize( $value ); } return $newvalue // returns an array - since this is the only way to get all veriables from the function } else I could be wrong but the only way it

Re: [PHP] Recursion to sanitize user input

2004-10-08 Thread Robet Carson
this would probably be even better: foreach ( $userInput as $key = $value ) { $newvalue[$key] = sanitize( $value ); // reassign key with sanatized value } return $newvalue // return array with sanatized $key = $value pairs } else My 2 cents: -- PHP General Mailing

Re: [PHP] Recursion to sanitize user input

2004-10-08 Thread Comex
foreach ( $userInput as $key = $value ) { $newvalue[$key] = sanitize( $value ); } return $newvalue; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Recursion to sanitize user input

2004-10-08 Thread zooming
Hi Comex Thanks! That worked! Robet you almost had it but missing the $key in $newvalue[$key]. - Original Message - From: Comex [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 08, 2004 8:05 PM Subject: Re: [PHP] Recursion to sanitize user input foreach ( $userInput

[PHP] Recursion help?

2004-09-19 Thread Gerard Samuel
Im trying to dynamically construct a multidimensional array to be used with PEAR's HTML_Menu. http://pear.php.net/manual/en/package.html.html-menu.intro.php. Basically, Im pulling the data from a DB table, and trying to attempt to convert the original array to what is needed for HTML_Menu. If you

Re: [PHP] Recursion help?

2004-09-19 Thread Marek Kilimajer
your children function can return only one child, and one parent can have more children. You should create an array of all children and loop that. Gerard Samuel wrote: Im trying to dynamically construct a multidimensional array to be used with PEAR's HTML_Menu.

Re: [PHP] Recursion help?

2004-09-19 Thread Gerard Samuel
Marek Kilimajer wrote: your children function can return only one child, and one parent can have more children. You should create an array of all children and loop that. As always, thanks for the nudge in the right direction. I was in the middle of rewriting it, and applied your suggestion to

[PHP] Recursion with database tables

2003-02-19 Thread Jono Bacon
Hi all, I am still pretty new to PHP, but I was chatting to a friend the other day and he put some thoughts into my head about how tables are laid out and processed. At the moment I have three tables: Topic, Message, Comment. A topic has messages and each message can have comments. I have set

Re: [PHP] Recursion with database tables

2003-02-19 Thread Ernest E Vogelsinger
At 14:43 19.02.2003, Jono Bacon said: [snip] At the moment I have three tables: Topic, Message, Comment. A topic has messages and each message can have comments. I have set this up with a table each and a field for the id of the parent (e.g. a comment will

Re: [PHP] Recursion with database tables

2003-02-19 Thread Jono Bacon
Ernest E Vogelsinger wrote: At 14:43 19.02.2003, Jono Bacon said: [snip] At the moment I have three tables: Topic, Message, Comment. A topic has messages and each message can have comments. I have set this up with a table each and a field for the id

Re: [PHP] Recursion with database tables

2003-02-19 Thread David Otton
On Wed, 19 Feb 2003 13:56:49 +, you wrote: One questions though - if I delete a topic, I need to delete all of its child messages and all of the child comments from each message. What is the best technique to do this? This has been driving me up the wall as it seems to involve some kind of

Re: [PHP] Recursion with database tables

2003-02-19 Thread Jono Bacon
David Otton wrote: On Wed, 19 Feb 2003 13:56:49 +, you wrote: One questions though - if I delete a topic, I need to delete all of its child messages and all of the child comments from each message. What is the best technique to do this? This has been driving me up the wall as it seems

Re: [PHP] Recursion with database tables

2003-02-19 Thread rblack
General [EMAIL PROTECTED] ahoo.co.uk cc: Subject: Re: [PHP] Recursion with database

Re: [PHP] Recursion with database tables

2003-02-19 Thread David Otton
On Wed, 19 Feb 2003 14:16:47 +, you wrote: Otherwise, yes, in MySQL you have to recurse down the tree deleting comments. How would I go about recursing down the tree? Has anyone done this before? I have, but it's been a while. Something like (pseudo-code) . def delete_comments(a) : for

Re: [PHP] Recursion with database tables

2003-02-19 Thread Ernest E Vogelsinger
At 15:16 19.02.2003, Jono Bacon spoke out and said: [snip] How would I go about recursing down the tree? Has anyone done this before? [snip] Given the DB layout I sketched before, you would: 1) delete all comments

Re: [PHP] Recursion with database tables

2003-02-19 Thread Ernest E Vogelsinger
At 14:56 19.02.2003, Jono Bacon spoke out and said: [snip] The code that you posed is the technique I have used at the moment. This technique works fine, but like my mate said, this limits me to a single parent for a comment/message. I admit that is

[PHP] recursion?????

2003-02-14 Thread Alex Davis
Ok ... here is the sitituation... I am creating a registration form. What I have so far works ... the user registers using this form and the form calls another page that will check the validity of the data (checking for username availability, etc...). If there is an error, display the error and

Re: [PHP] recursion?????

2003-02-14 Thread Bas Jobsen
not tested Basically, have the form action call itself hince the recursion. Any suggestion/examples? ? $field1=false; if(isset($_POST['submit'])) { /*check*/ if(isset($_POST['field1']) $_POST['field1']=='okay')header('Location: registration.php'); else $field1=true; } ? form

RE: [PHP] recursion?????

2003-02-14 Thread David Freeman
What I want to do is have the registration form, on submit, check the data validity right then, if there is an error, redisplay the form with an * next to the field that is incorrect. This is the code logic rather than the actual working code: ---Start of PHP Page--- 1. Check for form

Re: [PHP] Recursion

2001-10-01 Thread Sheridan Saint-Michel
- Original Message - From: Andres Montiel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 30, 2001 12:23 PM Subject: [PHP] Recursion One of my classes next semester needs me to program using a language that does recurison. I don't really know what this means, though. Can PHP do

[PHP] Recursion

2001-09-30 Thread Andres Montiel
One of my classes next semester needs me to program using a language that does recurison. I don't really know what this means, though. Can PHP do this? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL