[PHP] How do I call a function in a Class from another function in the same class
Hi, I have two functions in a class where one calls the other. When creating my object I get an error: Call to undefined function I dont understand why the function can't be seen? Thanks, Don --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How do I call a function in a Class from another function in the same class
I have two functions in a class where one calls the other. When creating my object I get an error: Call to undefined function I dont understand why the function can't be seen? You'll need to prepend $this- to the function call. class bob { function firstFunction() { } function secondFunction() { $this-firstFunction(); } } Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php