![]() |
|||
PHP
IT Tags
Stop Script SimpleXML server shutdown associative arrays control panel indexing solr Xampp Overlapping Layers ajax connection to MYSQL include my_thread_global_end Solr XML check domain Simplexml Parser php mail photo gallery Combo box Remove Duplicate sdf XHTML Mobile site local server magento ecommerce local server PHP and FLash multiple file uplo UPDATE objects mysql server |
how can i pass a value to an included file
By: Manoj | 19 Sep 2008 11:08 pm
Hello all, Comments
value=$xyz;
include "abc.php";
By: Shailesh Singh | 19 Sep 2008
include "abc.php?value= $xyz";
is also correct value=$xyz; include "abc.php"; is also correct Both will work But No. As previously stated variables that are already set are essentially 'passed' to the include file. HOWEVER... if you are defining a function... in the include file you may have to do one of these: 1. function something () { global $xyz; } OR 2. function something ($xyz) { } OR even 3. function something (&$xyz) { } What is in $xyz and what you are doing with it will dictate which method of access to use.
By: Shailesh Singh | 19 Sep 2008
|
