You are here: Re: Question to example from manual « PHP « IT news, forums, messages
Re: Question to example from manual

Posted by Jason Barnett on 06/16/05 23:36

janbro wrote:
> Hi, I've been working on this example and copied it in my
> webroot, it doesn't give me an output. Does anybody know why?
> "System" WinXP Apache 2.0.50 php 5.0.3

Because you've defined the function, but you've never called it.

>
> thx
> janbro
>
>
> Example 7-6. Static variables with recursive functions
>
> <?php
> function Test()
> {
> static $count = 0;
>
> $count++;
> echo $count;
> if ($count < 10) {
> Test ();
> }
> $count--;
> }

Test();

> ?>

--
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php

 

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

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