Get object 's array value in php
$obj = new Basecamp($bcUrl, $bcApikey, 'X', 'simplexml');
while print the object
print_r($obj);
Get array as following:
Basecamp Object
(
[request:protected] =>
[baseurl:protected] => https://test.basecamphq.com/
[format:protected] => simplexml
[username:protected] => 5d4dsh8745hkf876kjdfhkfsd843ea46a
[password:protected] => X
[request_body:protected] =>
)
I want to take value of [baseurl:protected] i.e get 'https://test.basecamphq.com/' only from this object.
[baseurl:protected]means that the object has a property calledbaseurlwhich has a visibility ofprotected. That means you can specifically not access it directly from outside the class. Look in the documentation of the class how you're supposed to access it. It probably has a method likegetBaseurlthat allows you to do so.