PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
or any form of echo, there is no problem. why does this happen, am i missing something?
The line $obj[10] = new testClass; means that you are instantiating an instance of the testClass and placing it into index 10 in the $obj array. So, when you do $obj[0]->whatever, it's not going to work because you did not specify an instance of the class in index 0 of $obj.
Make $obj[10] be $obj[0] and you'll see that your next lines will work.