I\'m learning a bit of PHP. It\'s supposed to print 0, however I get an error:
Notice: Trying to get property of non-object in...
The brackets on the outside of your JSON string are causing it to be an object inside of an array.
You can access the object by specifying which array member you want with $obj[0]->{'qty'};
OR change your json string so it instantiates into an object directly.
$json = '{"assetref":"","qty":0,"raw":0}';