Re: function I created doesn't work

From: Date: Fri, 04 Jan 2008 19:17:42 +0000
Subject: Re: function I created doesn't work
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-266637@lists.php.net to get a copy of this message
On Jan 4, 2008 12:52 PM, afan pasalic <afan@afan.net> wrote: > I think you didn't understand my question: I know why the function work > in 2nd example. My question was why I'm not getting the result in 1st > example? What am I doing wrong. And, as far as I know, I think it > doesn't have anything with GLOBALS (register_globals are anyway turned off). Also, keep in mind that, in the else{} clause of the first function, you're not using return; to send back the information. In my opinion, you shouldn't call a function from within its own definition because it can cause a loop if the conditions are met and the else{} clause is reached over and over again. If there is a situation where get_content(0, 0, $index1); doesn't return any rows, the function will loop eternally (that is, until PHP gets dizzy and gives up). -- Daniel P. Brown [Phone Numbers Go Here!] [They're Hidden From View!] If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you.

« previous php.general (#266637) next »