1
   

In need of help.

 
 
Reply Sat 19 Feb, 2022 10:35 am
Hi,
I am using this book called Learn PHP 8. I found the books code on a website. I compared the two scripts, they are the same. I ran the authors code and it gets the same error as my code. Here is the lines of code that are giving me the errors.


$lab = new Dog;

$dog_error_message = $lab->set_dog_name('Fred');
print $dog_error_message == TRUE ? 'Name update successful<br/>' : 'Name update not successful<br/>';


Here is the error that I get: Uncaught Error: Call to undefined method Dog::set_dog_name()
I have tried to find the problem, but when two different pieces of code do the same error I am at a loss
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 1 • Views: 297 • Replies: 0
No top replies

 
 

Related Topics

Texting for beginners - Question by JeromeBernardJames
Random Story-Idea Generator - Question by Jxargo
Best PAID Javascript course - Question by theblaze2006
Beginner acting tips/exersizes? - Question by Cgirl lover
Hello - Question by Ritual
What Topics Should I Write About? - Question by shatter
how to start painting? - Question by BlueBlink
I have a new hobby: Baking! - Discussion by bridgeyeakel
 
  1. Forums
  2. » In need of help.
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 05/28/2024 at 06:55:53