Jul 22, 2003 #1 Michael42 Programmer Joined Oct 8, 2001 Messages 1,454 Location US Hello, What is the easiest way to display all a Classes instance variables (and values) without hard coding each one? Thanks, Michael42
Hello, What is the easiest way to display all a Classes instance variables (and values) without hard coding each one? Thanks, Michael42
Jul 22, 2003 1 #2 sleipnir214 Programmer Joined May 6, 2002 Messages 15,350 Location US Check out print_r(). (http://us4.php.net/manual/en/function.print-r.php) Want the best answers? Ask the best questions: http://www.catb.org/~esr/faqs/smart-questions.htmlTANSTAAFL!! Upvote 0 Downvote
Check out print_r(). (http://us4.php.net/manual/en/function.print-r.php) Want the best answers? Ask the best questions: http://www.catb.org/~esr/faqs/smart-questions.htmlTANSTAAFL!!
Jul 22, 2003 Thread starter #3 Michael42 Programmer Joined Oct 8, 2001 Messages 1,454 Location US print_r() looks really cool! Please give me an example of how to use it to output all the instance variables of say a class called MyReports. Thanks again for your help, Michael42 Upvote 0 Downvote
print_r() looks really cool! Please give me an example of how to use it to output all the instance variables of say a class called MyReports. Thanks again for your help, Michael42
Jul 22, 2003 #4 sleipnir214 Programmer Joined May 6, 2002 Messages 15,350 Location US Instantiate the class into a variable. Pass the variable to print_r() Want the best answers? Ask the best questions: http://www.catb.org/~esr/faqs/smart-questions.htmlTANSTAAFL!! Upvote 0 Downvote
Instantiate the class into a variable. Pass the variable to print_r() Want the best answers? Ask the best questions: http://www.catb.org/~esr/faqs/smart-questions.htmlTANSTAAFL!!
Jul 22, 2003 Thread starter #5 Michael42 Programmer Joined Oct 8, 2001 Messages 1,454 Location US >> Instantiate the class into a variable. >> Pass the variable to print_r() Yes, of course!!! Thanks. I was making it too hard (again). Michael42 Upvote 0 Downvote
>> Instantiate the class into a variable. >> Pass the variable to print_r() Yes, of course!!! Thanks. I was making it too hard (again). Michael42