php question Create a new object for a Student with the foll

php question

Create a new object for a Student with the following information:

name = \'Peeta Mellark\'

ssn = 123456789

gpa = 3.1

status = \'sophomore\'

Echo that information for that student.

Solution

Creating a Object in PhP
$myObj = (Student) [
\"name\" => \"Peeta Mellark\",
\"ssn\" => \"123456789\"
\"gpa\" => \"3.1\"
\"status\" => \"sophomore\"
];
echo $myObject->Peeta Mellark;

We can also create a object that can enclose all these values in the form of array.

php question Create a new object for a Student with the following information: name = \'Peeta Mellark\' ssn = 123456789 gpa = 3.1 status = \'sophomore\' Echo th

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site