php-general Digest 16 Aug 2012 19:39:39 -0000 Issue 7925

2012-08-16 Thread php-general-digest-help
php-general Digest 16 Aug 2012 19:39:39 - Issue 7925 Topics (messages 318717 through 318724): Re: Two ways to obtain an object property 318717 by: phplist Display Array Tree as Menu - Can't figure out how to find depth with something over 2 levels 318718 by: Tristan

Re: [PHP] Two ways to obtain an object property

2012-08-16 Thread Mihamina Rakotomandimby
On 08/15/2012 11:28 AM, phplist wrote: This relates to a minor dilemma I come across from time and time, and I'm looking for advice [...] Within a site I have a User object, and within page code would like to have if ($crntUser-isASubscriber) {...} [...] if ($crntUser-isASubscriber()) {...}

Re: [PHP] Two ways to obtain an object property

2012-08-16 Thread phplist
On 08/15/2012 11:28 AM, phplist wrote: This relates to a minor dilemma I come across from time and time, and I'm looking for advice [...] Within a site I have a User object, and within page code would like to have if ($crntUser-isASubscriber) {...} [...] if ($crntUser-isASubscriber()) {...}

[PHP] Display Array Tree as Menu - Can't figure out how to find depth with something over 2 levels

2012-08-16 Thread Tristan
I can't for the life of me figure out how to find the depth of the array that I'm looping through to output tabs or indentations to the display for each depth. The entries also have section postition if you can figure out how to include that within each depth of the results I will buy you a case

Re: [PHP] Display Array Tree as Menu - Can't figure out how to find depth with something over 2 levels

2012-08-16 Thread Volmar Machado
http://www.php.net/manual/es/function.array-walk-recursive.php 2012/8/16 Tristan sunnrun...@gmail.com: I can't for the life of me figure out how to find the depth of the array that I'm looping through to output tabs or indentations to the display for each depth. The entries also have section

Re: [PHP] Display Array Tree as Menu - Can't figure out how to find depth with something over 2 levels

2012-08-16 Thread Tristan
Yeah I saw that but, I still can't figure out how to know which depth it's at? I've spent about 8 hours on it trying all kinds of things but my logic ends up failing. On Thu, Aug 16, 2012 at 11:06 AM, Volmar Machado qi.vol...@gmail.comwrote:

Re: [PHP] Display Array Tree as Menu - Can't figure out how to find depth with something over 2 levels

2012-08-16 Thread David OBrien
On Thu, Aug 16, 2012 at 12:40 PM, Tristan sunnrun...@gmail.com wrote: I can't for the life of me figure out how to find the depth of the array that I'm looping through to output tabs or indentations to the display for each depth. The entries also have section postition if you can figure out

Re: [PHP] Display Array Tree as Menu - Can't figure out how to find depth with something over 2 levels

2012-08-16 Thread Tristan
Thanks David, Here's my tree creation. I'm trying to either put depth count on each array or run through the tree and figure it out after. I just can't figure out where to put it :D Great very lightweight script to create a tree from parent id and id if you want to save this one for yourself btw.

Re: [PHP] Display Array Tree as Menu - Can't figure out how to find depth with something over 2 levels : ANSWERED

2012-08-16 Thread Tristan
Thanks for all your help. The answer was so simple in the end. Thanks Tim for clearing that up!!! Perfect little script now for creating navigation. Just feed it an array like posted at the bottom of this message. function createTree($list, $parent){ global $depth; $depth++; //

Re: [PHP] Display Array Tree as Menu - Can't figure out how to find depth with something over 2 levels

2012-08-16 Thread Tommy Pham
On Thu, Aug 16, 2012 at 11:05 AM, Tristan sunnrun...@gmail.com wrote: Thanks David, Here's my tree creation. I'm trying to either put depth count on each array or run through the tree and figure it out after. I just can't figure out where to put it :D Great very lightweight script to create a

Re: [PHP] Display Array Tree as Menu - Can't figure out how to find depth with something over 2 levels

2012-08-16 Thread Volmar Machado
I have develop a solution in a one function as in the example, which permit you to have n-level menu array, if you want you can change the returns by a echo to, if you want the ouput in html. http://pastebin.com/QJUsxPBw -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] PHP session variables

2012-08-16 Thread Tedd Sperling
On Aug 15, 2012, at 4:42 PM, Andrew Ballard aball...@gmail.com wrote: On Wed, Aug 15, 2012 at 3:24 PM, Tedd Sperling t...@sperling.com wrote: The php manual ( http://us3.php.net/manual/en/function.session-start.php ) First Note states that session_start() must be called *before* anything sent

Re: [PHP] PHP session variables

2012-08-16 Thread Tedd Sperling
On Aug 15, 2012, at 4:13 PM, Robert Cummings rob...@interjinn.com wrote: I only pointed it out because I used to do exactly the same thing :) Cheers, Rob. Thanks, I was starting to feel pretty dumb. Cheers, tedd _ t...@sperling.com http://sperling.com -- PHP

Re: [PHP] Need to have form protection techniques

2012-08-16 Thread tamouse mailing lists
On Thu, Aug 16, 2012 at 11:05 PM, Ansry User 01 yrsna.res...@gmail.com wrote: I need to know the forms validity techniques for Php. Is that all? Seriously, that is a very lengthy discussion, and may depend on which framework you may be using. -- PHP General Mailing List (http://www.php.net/)