Re: How can I track the value in php

From: Date: Sat, 05 Nov 2005 23:41:25 +0000
Subject: Re: How can I track the value in php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-225198@lists.php.net to get a copy of this message
> in my index page, I firstly inlcude_once a A.php file, where i defined an > array, secondly I include another .php file named B.php, where I want to use > the array, I have claimed it as global type, but it seems I can't retrieve > any value from the array. When you include a PHP file, it will be executed in the current context (AFAIK). If you're not including it from a function, then it should be global automatically. The global keyword makes variables in functions global. Maybe this is obvious, but are you sure you have <?php in the B.php? What does var_dump($xxx); say, if $xxx is the array name?

« previous php.general (#225198) next »