0
I got this feedback from an API:
object(stdClass)[2]
public 'data' =>
object(stdClass)[44]
public 'id' => float 3.5795374673835E+14
public 'completed' => boolean false
public 'name' => string 'Dia dos Namorados' (length=17)
And I’d like to count how many projects have the key completed => true
, how can I do this?
Example:
if ( $objeto->completed == true )
{
$contar++;
}
Doesn’t it work? What’s the problem? Tried
$objeto->data->completed
?– rray