Re: re-using variables
- From: Sjoerd <sjoerd-news@xxxxxxxxxxxx>
- Date: Tue, 27 Feb 2007 19:34:03 +0100
Mitesh wrote:
$res = mysql_query($req);
.............
$res = mysql_query($req);
In other words since PHP uses garbage collection re-using the same
variable can cause problems. Is this true?
Using the same variable twice is fine. Don't bother too much about the garbage collector. Since it removes variables when you don't use them anymore, it never gets in the way.
You probably have another problem which causes things to fail sometimes.
Sjoerd
.
- References:
- re-using variables
- From: Mitesh
- re-using variables
- Prev by Date: Re: Trouble passing mysql table name to php function and using it!
- Next by Date: Re: Trouble passing mysql table name to php function and using it!
- Previous by thread: Re: re-using variables
- Next by thread: Re: re-using variables
- Index(es):
Relevant Pages
|