title: How to Convert Boolean to String
body: <p>I have a Boolean variable which I want to convert to a string:</p>
  
  <pre><code>$res = true;
  </code></pre>
  
  <p>I need the converted value to be of the format: <code>"true" "false"</code>, not <code>"0" "1"</code></p>
  
  <pre><code>$converted_res = "true";
  $converted_res = "false";
  </code></pre>
  
  <p>I've tried:</p>
  
  <pre><code>$converted_res = string($res);
  $converted_res = String($res);
  </code></pre>
  
  <p>But it tells me that <code>string</code> and <code>String</code> are not recognized functions.<br>
  How do I convert this Boolean to a string in the format of <code>"true"</code> or <code>"false"</code> in PHP?</p>