0

How to create an Object?

class name{function name() { & thus->model='somthing';} }

7th Aug 2016, 12:15 AM
Daliah Aljutayli-ŰŻŰ§Ù„ÙŠÙ‡ Ű§Ù„ŰŹŰ·ÙŠÙ„ÙŠ
Daliah Aljutayli-ŰŻŰ§Ù„ÙŠÙ‡ Ű§Ù„ŰŹŰ·ÙŠÙ„ÙŠ - avatar
2 Answers
0
if you have the class like this $object = new name (); $object->name ();
8th Aug 2016, 7:45 AM
francis
0
to create an object first you have to create a class ex: <?php class person { public $name; public $age; public function setData($n,$a) { $this->name = $n; $this->age = $a; } } $p = new person; $p->setData("amar",25); ?> you can add more function in the class
13th Aug 2016, 5:30 PM
Amar Agrawal
Amar Agrawal - avatar