title: extract data from XML response w/PHP
body: <p>When I get an API response containing this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;response xmlns="http://www.XXXXXXX.com/api/" status="ok"&gt;
    &lt;client_id&gt;17992&lt;/client_id&gt;
  &lt;/response&gt;
  </code></pre>
  
  <p>I can get the results of the <code>&lt;client_id&gt;</code> using this.</p>
  
  <pre><code>$xml = simplexml_load_string($server_output);
  $client = (string) $xml-&gt;client_id;
  echo $client; // produces 17992 in this case
  </code></pre>
  
  <p>but if I add this below, I do not get a value assigned to $response.</p>
  
  <pre><code>$response = (string) $xml-&gt;response; // produces empty value
  </code></pre>
  
  <p>How do I write the PHP code to check if XML response "status" = OK?</p>