How to retrieve value from a complicated object structure in php? I know using '->' operator we can access the value but I am very confused in the object I am returned with. From the object returned, I want to fetch the character value. How do i do that?
I am using Neo4jPHP and trying to execute a cypher query "MATCH (n) RETURN distinct keys(n)" to return all distinct property keys. After doing a var_dump of the row object, the partial output is shown below.
Edit:- My edited code after following Mikkel's advice:-
$keyquery="MATCH (n) RETURN distinct keys(n)";
$querykey=new Everyman\Neo4j\Cypher\Query($client, $keyquery);
$resultkey = $querykey->getResultSet();
foreach ($resultkey as $row)
{
for($i=0;$i<count($row[0]);$i++)
{
echo $row[0][$i]; // returns all the property keys from the Row object
}
}
The value you are looking for is protected and not accessible,