You are here: Re: Recursionalism « PHP Programming Language « IT news, forums, messages
Re: Recursionalism

Posted by Jon Slaughter on 05/04/07 04:24

"Mohawk Moak" <blessblessbless@gmail.com> wrote in message
news:1178249760.084436.255930@c35g2000hsg.googlegroups.com...
> this method worked good, i did not realize to set the global twice.
> the reason to set the counter to 0 in the end is so that the function
> is usable more than 10 times (or whatever limit it is)
> thanks for pointing out that it was in the wrong row though xD
> probably would not have figuered that one out so fast
> bless
>

Yeah. See Normans post about static variables. Normally this is what you use
but I didn't know if php had it(though that is what global was).

If you get a program like zend studio then you can debug your code and step
through it one line at a time and see whats going on. This is how I found
out that your counter was local and not actually counting the recursive
steps. It makes it much easier to write code if you can debug it.

Jon

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация