title: Replace empty form fields with text
body: <p>I have a form that users fill out, the contents of which get sent to dompdf for processing.  If a user elects <strong>not</strong> to fill out a field, I want that to be reflected by "not entered" on the resulting pdf for any of the empty fields throughout the form.</p>
  
  <p>I'm trying to update the fields before they're sent to dompdf for processing by doing something like this:</p>
  
  <pre><code>&lt;?php
  
  foreach ($_POST as $key =&gt; $value)
      {
          if(empty($value))
              {
                  $_POST[$key] = "Not entered";
              }
      }
  ?&gt;
  </code></pre>
  
  <p>But it doesn't work. It just passes on empty $value(s).</p>
  
  <p>So my question is: How can I loop through the $_POST array, replacing the $value of a $key=>$value pair with, "not entered" if $value is empty?</p>
  
  <p>Thank you for any help.</p>