if it is within a function, then you should define the var outside the
function, then inside the function you can do this;
$foo = "bar";
function foobar() {
global $foo;
$foo .= " bar";
}
echo $foo // will output "bar bar";
HTH
Beau
// -----Original Message-----
// From: eat pasta type fasta [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 11 April 2002 4:17 PM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Local to Global Variables
//
//
// Not 100% DB related but soon
//
// I am processing a text file by looking for strings which
// later depending
// on the findings will be submitted to db
//
// my problems is that in one if statemant I find a piece of
// text and need
// another statment to use it later, but it seems that the
// variable declared
// to the found string remains local.
//
// Is there a way to set variables from within functions/if
// statements so
// they become available to all.
//
// Thnaks in advance
//
// R>
//
// --
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, visit: http://www.php.net/unsub.php
//
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php