• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to call a function from a function in the same class?

#1
[eluser]TerryT[/eluser]
Struggling with this and any help is appreciated. Here's the code:

I am extending the tcpdf class to use a custom header and footer.

Code:
class Mypdf extends TCPDF

In this class I have the following:

Code:
public function newpdf($title, $subject, $report_name)
public function body_project_listing()

The first function sets up the pdf report and the second function hits the database and gets the info for the body of the report. I am trying to call body_project_listing from within newpdf by $this->body_project_listing and keep getting Fatal error: Call to undefined method Mypdf::project_body_listing() in Mypdf.php on line 116.

Line 116 is $this->project_body_listing();

Thanks


Messages In This Thread
How to call a function from a function in the same class? - by El Forum - 11-08-2011, 07:24 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.