This forum is now read-only. Please use our new forums! Go to forums
HELP, PLEASE!!!!! DID YOU ADD THE PHP TAGS
please this is my code but i cant seem to figure out what i have done wrong please help me out
<?php
class Dog {
public $numLegs = 4;
public $name;
public function __construct($name){
$this->name=$name;
}
}
?>
Answer 538b9cdd548c35d89a0005eb
Answer 538cf36c8c1ccc33780001dc
2 votes
Looks good so far, just incomplete. You still need to do something like
$dog1 = new Dog(“dog1sName”);
outside of the class. Then echo back the name.
Answer 543afa0e631fe98c85000613
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency