Re: How can I track the value in php

From: Date: Wed, 09 Nov 2005 00:08:43 +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-225342@lists.php.net to get a copy of this message
On Sat, November 5, 2005 3:44 am, shining wrote: > I am php beginner, I have a question: > 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. global only really makes sense in the context of INSIDE a function (or method of a class) So *where* did you declare it global? You probably want to take out the global unless it is inside of a function() { } > So I want to ask: > 1. Is my use way right? > 2. if I want to track a variable value how it changed between php > functions, > besides I print out it's value, Is there any other way to do it? There are IDEs you can use to watch variables as a script executes. Zend IDE Komodo are the ones I remember as "good" from when I last looked at IDEs YMMV -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#225342) next »