This forum is now read-only. Please use our new forums! Go to forums
banner
Close banner
blocage exercice 1
Quand je veux valider mon code il me demande si j’ai bien créer la variable $me merci de votre aide Voici le code :
class Person { }
$me= new Person ();
Answer 5477e20f8c1ccc0d63005e84
0 votes
Essayez ceci:
class Person {
public $firstname; public $lastname;
} public function__construct($firstname, $lastname){ $this->firstname = $firstname; $this->lastname = $lastname; } public function presentation(){ return “Bonjour, je suis “. $this->firstname . “ “ . $this->lastname . “. Ravi de vous rencontrer !”; } $me = new Person(“y4nn9”, “Lecode”); echo $me->presentation();
Answer 547a5e4080ff33b496006fab
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
1 comments
merci ça fonctionne