I have an object like this:
myObj = {"id":12,"title":"my title","content":"my content"}
I want to loop through all the element of this object to have something like this:
echo " $key ." = ". $value
result : id = 12
title = my title
content = my content
but if I loop through my object like this:
foreach ($obj as $key => $value) {
echo "$key = $value\n";
}
and I got this result :
incrementing => 1
exists => 1
wasRecentlyCreated =>
How can I get the elements of my object?