title: PHP: Add <span> to all <td> w/ no content?
body: <p>I have a PHP-driven <code>&lt;table&gt;</code> that has multiple empty <code>&lt;td&gt;</code>s, and I want to add a <code>&lt;span&gt;</code> to each empty <code>&lt;td&gt;</code>. I specifically want this to occur:</p>
  
  <p>-Add <strong><code>&lt;span style="display: none"&gt;(empty)&lt;/span&gt;</code></strong> to each empty <code>&lt;td&gt;</code></p>
  
  <p>How can I make that happen with PHP and not jQuery in the code posted below? This is the code that generates each <code>&lt;td&gt;</code>:</p>
  
  <pre><code>if ( is_array( $assign ) ) {
      $assign_users = '';
      if ( $layout == 'table' ) $this-&gt;list .= '&lt;td class="todo-assigned"&gt;';
      foreach ( $assign as $value ) {
          if ( $value != '-1' &amp;&amp; $value != '' &amp;&amp; $value != 0 ) {
              $user = get_userdata( $value );
              $assign_users .= $user-&gt;display_name.', ';
          }
      }
      $this-&gt;list .= substr( $assign_users, 0, -2 );
      if ( $layout == 'table' ) $this-&gt;list .= '&lt;/td&gt;';
  }
  </code></pre>