how to create an object in class
Posted: Wed Nov 08, 2006 3:00 am
hi,
i need code for how to create an object in class, give the example.
Thanks.
i need code for how to create an object in class, give the example.
Thanks.
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$object = new ClassNameGoesHere();How to create object in class ? What do you mean ? For example:qumar wrote:hi,
i need code for how to create an object in class, give the example.
Thanks.
Code: Select all
<?php
require_once ('class.Foo.php');
class Bar {
private $_foo;
public function __construct () {
$this->_foo = new Foo();
}
}
?>