0
How to create an Object?
class name{function name() { & thus->model='somthing';} }
2 Answers
0
if you have the class like this
$object = new name ();
$object->name ();
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