Guest davemelst Posted January 20, 2010 Report Share Posted January 20, 2010 I went through the beginning pdg tutorial and got all of it to work except this below. I created new and seperate index and class_lib pages and folders and this would not echo. Can anyone help? if (name != "Jimmy Two Guns") { $this->name = strtoupper($new_name); } Quote Link to comment Share on other sites More sharing options...
administrator Posted January 20, 2010 Report Share Posted January 20, 2010 if (name != "Jimmy Two Guns") {$this->name = strtoupper($new_name); } Just remove the $this Quote Link to comment Share on other sites More sharing options...
einsteinsboi Posted January 20, 2010 Report Share Posted January 20, 2010 I think you also want to have the $ before name. In other words $name, not just name. Quote Link to comment Share on other sites More sharing options...
Michael_ Posted February 7, 2010 Report Share Posted February 7, 2010 einsteinsboi is close, $name would be better, but $new_name is probably correct. if ($new_name != "Jimmy Two Guns") { $this->name = strtoupper($new_name); } 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.