PHP IF function from JSON data
<p>I have the following data, when doing var_dump() on my data:</p>

<pre><code>  ["time_zone"]=&gt;
   string(6) "London"
  ["geo_enabled"]=&gt;
   bool(false)
  ["verified"]=&gt;
   bool(true)
</code></pre>

<p>I can do the following to access the string <code>"London"</code>: <code>$UserTimeZone = $userProfile-&gt;time_zone;</code></p>

<p>However I also need to be able to determine whether the <code>"verified"</code> bool value is true/false. </p>

<p>How can I write an if to check if the <code>"verified"</code> bool value is true/false.</p>

<p>I've tried the following and it isn't working it always returns - not verified:</p>

<pre><code>$verified-&gt;verified;

if ($verified) {
  echo "verified";
} else {
  echo "not verified";
}
</code></pre>

<p>Any help appreciated.</p>
