Dougget Posted January 25, 2009 Report Share Posted January 25, 2009 <?php $jimmy = new person("Nick Giggings"); $number->set_pinn_number("345678"); $stefan = new person("Stefan Mischook");echo "Stefan's full name: " . $stefan->get_name()."";echo "Nick's full name: " . $jimmy->get_name();echo "Tell me private stuff: " . $number->get_pinn_number;echo "hello";?> Quote Link to comment Share on other sites More sharing options...
monkeysaurus Posted January 25, 2009 Report Share Posted January 25, 2009 (edited) You're calling the set_pinn_number method on the $number instance, which you haven't instantiated. You should do this instead: $jimmy->set_pinn_number("345678"); Then, later on: echo "Tell me private stuff: " . $jimmy->get_pinn_number; See how you get on with that. Edited January 25, 2009 by monkeysaurus Quote Link to comment Share on other sites More sharing options...
Dougget Posted January 25, 2009 Author Report Share Posted January 25, 2009 Thanks:) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.