![]() |
|||
PHP
IT Tags
PHP and FLash multiple file uplo sdf connection to MYSQL Mobile site check domain ajax mysql server Simplexml Parser UPDATE photo gallery local server associative arrays XHTML Combo box server shutdown php mail include local server Solr XML control panel SimpleXML magento ecommerce Overlapping Layers my_thread_global_end Xampp Stop Script indexing solr objects Remove Duplicate |
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
|
