Home  |  Linux  | Mysql  | PHP  | XML
From:Tiborrocketmachine.com@osu1.php.net Date:Sun Oct  5 23:00:11 2008
Subject:note 86149 added to language.variables.superglobals
You can use superglobals to make your variables available everywhere without declaring them global.

<?php

$_ENV['mystring'] = 'Hello World';
$_ENV['myarray'] = array('Alpha', 'Bravo', 'Charlie');

function test() {
	print $_ENV['mystring'];
	print_r($_ENV['myarray']);
}

test();

?>
----
Server IP: 69.147.83.197
Probable Submitter: 65.95.120.192
----
Manual Page -- http://www.php.net/manual/en/language.variables.superglobals.php
Edit        -- https://master.php.net/note/edit/86149
Del: integrated  -- https://master.php.net/note/delete/86149/integrated
Del: useless     -- https://master.php.net/note/delete/86149/useless
Del: bad code    -- https://master.php.net/note/delete/86149/bad+code
Del: spam        -- https://master.php.net/note/delete/86149/spam
Del: non-english -- https://master.php.net/note/delete/86149/non-english
Del: in docs     -- https://master.php.net/note/delete/86149/in+docs
Del: other reasons-- https://master.php.net/note/delete/86149
Reject      -- https://master.php.net/note/reject/86149
Search      -- https://master.php.net/manage/user-notes.php

Navigate in group php.notes at sever news.php.net
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by Zareef Ahmed
Powered By PHP Consultants