Re: argument variable gets lost in function

From: Date: Thu, 25 Oct 2001 15:45:59 +0000
Subject: Re: argument variable gets lost in function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-72281@lists.php.net to get a copy of this message
hmm...weird! is that the code? if you show us your real code...maybe you're missing a small detail... "Spunk S. Spunk III" <spunk@mac.com> wrote in message news:B7FDEF31.DF54%spunk@mac.com... > I'm assigning a variable a value from an associative array. > $variable = $array["key"]["value"]; > > Then passing the $variable to a function. > SomeFunction($variable) > > The variable exists (can be printed) until a built-in function (within the > original function) is called. > echo "$variable"; //prints out fine > $variable2 = ereg_replace(" ", "_", "$variable"); > echo "$variable"; //prints out NOTHING... > > Why is this and how can I get around it? > > Thanks, > Spunk > >

« previous php.general (#72281) next »