Write the value of a boolean to a file in php
<p>I am trying to log some data for a bug fix of a project. I have a boolean which i need to write to a text file but for some reason the boolean is never printed below is the code that calls the function to write the log. </p>

<pre><code>writeLog("Index: $index Create Table Headers: ". $myBoolean);
</code></pre>

<p>And below is the code of the function that actually writes to the file</p>

<pre><code>function writeLog($message)
{
    $file = "log.txt";
    $fh = fopen($file, 'a') or die("Can't open file");
    $content = $message . "\r\n";
    fwrite($fh, $content);
    fclose($fh);
}
</code></pre>

<p>When the file is written All I am getting is</p>

<blockquote>
  <p>Index: 0 Create Table Headers:</p>
</blockquote>

<p>I have tried using var_export($myBoolean) but didn't make any difference</p>

<p>Thanks for any help you can provide. </p>
