note 28076 added to function
| From: | arathorn at ifrance dot com | Date: | Wed, 01 Jan 2003 01:02:57 +0000 |
| Subject: | note 28076 added to function | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-41531@lists.php.net to get a copy of this message | ||
If u want to put somes variables in function that was'nt passed by it, you must use
"global" :
<?php
$op2 = blabla;
$op3 = blabla;
function foo($op1)
{
global $op2, $op3;
echo $op1;
echo $op2;
echo $op3;
}
?>
--
http://www.php.net/manual/en/function.php
http://master.php.net/manage/user-notes.php?action=edit+28076
http://master.php.net/manage/user-notes.php?action=delete+28076
http://master.php.net/manage/user-notes.php?action=reject+28076