View Single Post
Old 11-17-2007, 01:10 PM   #1 (permalink)
Morishani
The Contributor
 
Join Date: Nov 2007
Posts: 32
Thanks: 5
Morishani is on a distinguished road
Default Class inside a class(?)

Hey all, I have a question for you.

I Have one class, lets call it for example "table". inside that class I want to insert another class, for example "columns".

but I don't need the "columns" class outside of the "table" class, only inside it, and only 1 columns class will be needed within a table class.

PHP Code:
//Good code :
$table = new table();
$table->columns->add("asdf");

//Bad code :
$columns = new columns();
$columns->add("asdf"); 
How can i do that? thanks.
Send a message via ICQ to Morishani Send a message via MSN to Morishani
Morishani is offline  
Reply With Quote