Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Arrays data dissapear when using include("foo.php")

Status
Not open for further replies.

cadbilbao

Programmer
Apr 9, 2001
233
ES
Hi.

If I create "array_info.php":
---------
$myList = array ("John", "Mary");
----------

and "foo.php":
--------
require_once("array_info.php");
print_r($myList);
-------

it works ok.

But if I create "another_script.php":
---------
include("foo.php");
---------

myList data dissapear, and 'print_r' doesn't show any information. Any
similar experience?
 
Thank you. You're right. I'll open another thread with more concise information.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top