I can't figure this out...
<?php
class test
{
var count;
var countTest;
function read()
{
do a bunch of stuff
if(AsfdasDF)
testDoThis();
}
function testDoThis()
{
do all this stuff
}
}
?>
Then I have another script it order to run the read function will should in turn run all the other functions(kinda like the main function if this were java)
This script looks like this:
<?php
include (/test.php)
read();
?>
But When I try to do this I get an error that says when it tries to run read() the function testDoThis() does not exist?? I am fairly new to php. Any help is appreciated or example sites?
Nested Function Calls
Moderator: General Moderators
-
hitman6003
- Forum Newbie
- Posts: 4
- Joined: Mon Jun 23, 2008 7:36 pm
Re: Nested Function Calls
Code: Select all
function read() {
//do a bunch of stuff
if(AsfdasDF)
$this->testDoThis();
}http://www.php.net/language.variables.scope