Ask a Question related to PHP Notes, Design and Development.
-
ppo@beeznest.net #1
note 33832 added to language.variables.scope
Even if an included file return a value using return(), it's still sharing the same scope as the caller script!
<?php
$foo = 'aaa';
$bar = include('include.php');
echo($foo.' / '.$bar);
?>
where include.php is
<?php
$foo = 'bbb';
return $foo;
?>
The output is: bbb / bbb
Not: aaa / bbb
----
Manual Page -- [url]http://www.php.net/manual/en/language.variables.scope.php[/url]
Edit Note -- [url]http://master.php.net/manage/user-notes.php?action=edit+33832[/url]
Delete Note -- [url]http://master.php.net/manage/user-notes.php?action=delete+33832&report=yes[/url]
Reject Note -- [url]http://master.php.net/manage/user-notes.php?action=reject+33832&report=yes[/url]
ppo@beeznest.net Guest
-
note 33856 added to language.variables
ASCII is a 7-bit encoding, so there is no such thing as ASCII 228. Now 8-bit extensions of ASCII like ISO-8859-1 (Latin-1) do have a codepoint... -
note 33854 added to language.variables.variable
I found a nice application to variable variables to be dynamic forms. Say that you have a form for entering information about persons, but don't know... -
note 33845 added to language.variables.external
In reply to the second post: This function construct an HTTP vars array It is useful for javascript/dom incompatibility with form_input_item... -
note 33746 added to language.variables.predefined
Globals = Off is advised for newbies, since they are more than likely to use something like: if ($pass = "admin") { $loggedin = 1; } if... -
note 33570 added to language.variables
(remove me =) "täyte" means 'filling' in finnish, "mansikka" means 'strawberry' in finnish also... ---- Manual Page --...



Reply With Quote

