Re: [PHP] Clearing a variable
you can clear a string by doing this: $string = ''; you can clear an array by doing this: $array = array(); you can clear (or zero out rather) an integer or float by doing: $int_or_float = 0; or you can simply unset() the variable: unset($any_of_the_above); Jeremy Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "LINUX is obsolete" -- Andy Tanenbaum, January 29th, 1992 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://www.JEEP-FOR-SALE.com/ -- I need a buyer Get your own Free, Private email at http://www.smackdown.com/ On Thu, 18 Jan 2001, Brandon Orther wrote: > Date: Thu, 18 Jan 2001 14:44:56 -0800 > From: Brandon Orther <[EMAIL PROTECTED]> > To: PHP User Group <[EMAIL PROTECTED]> > Subject: [PHP] Clearing a variable > > Hello, > > How can I clear a variable? > > Thank you, > > > Brandon Orther > WebIntellects Design/Development Manager > [EMAIL PROTECTED] > 800-994-6364 > www.webintellects.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Clearing a variable
> On Thu, 18 Jan 2001, Brandon Orther wrote: > > > Hello, > > > > How can I clear a variable? > > > > Thank you, > > > > > > Brandon Orther > > WebIntellects Design/Development Manager > > [EMAIL PROTECTED] > > 800-994-6364 > > www.webintellects.com > > > > > > unset($var); > Actually, just to clarify, that removes a variable from the symbol table. to clear the contents of a variable, just set it to null: $var = NULL; // $var is now empty -sterling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Clearing a variable
unset($var) On Thu, 18 Jan 2001, Brandon Orther wrote: > Hello, > > How can I clear a variable? > > Thank you, > > > Brandon Orther > WebIntellects Design/Development Manager > [EMAIL PROTECTED] > 800-994-6364 > www.webintellects.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Clearing a variable
On Thu, 18 Jan 2001, Brandon Orther wrote: > Hello, > > How can I clear a variable? > > Thank you, > > > Brandon Orther > WebIntellects Design/Development Manager > [EMAIL PROTECTED] > 800-994-6364 > www.webintellects.com > > unset($var); -- Ignacio Vazquez-Abrams <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Clearing a variable
Hello, How can I clear a variable? Thank you, Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]