View Single Post
Old 12-07-2007, 03:31 PM   #3 (permalink)
bmicallef
The Wanderer
 
bmicallef's Avatar
 
Join Date: Nov 2007
Posts: 18
Thanks: 3
bmicallef is on a distinguished road
Default

Wildhoney,

I am away from my laptop at this minute and can't play with this so I'll just ask instead ... If I have the following object and try to json_encode it, how is the $obj variable handled?

PHP Code:
class MyClass
{
 public 
$var1 5;
 private 
$_var2 0;
 
 public function 
GetVar2()
 {
  return 
$this->_var2;
 }
}
 
$obj = new MyClass();
echo( 
json_encode$obj ) ); 
What would this output look like???

Brad

Last edited by bmicallef : 12-07-2007 at 03:37 PM. Reason: How do I make the cute php code blocks??? -- Found it!
Send a message via AIM to bmicallef
bmicallef is offline  
Reply With Quote