title: What's wrong? I am receiving error msg: Invalid arguments passed in eval()
body: <p>I write down my php code:</p>
  
  <pre><code>&lt;?php
          // 已有指定 material, 顯示 material 資訊
          if (strlen($m_id) &gt; 0) {
              // 此 material 屬於哪些 mgroup
              $group_info = $mUtil-&gt;groupInfo($m_id);
              $group_names = array();
              foreach ($group_info as $mg_id =&gt; $row) {
                  if (!$row["not_in_group"]) {
                      $group_names[] = $row["mg_name"];
                  }
              }
          }
      ?&gt;
  
    &lt;table width="100%"&gt;
      &lt;tr&gt;
        &lt;th colspan="2"&gt;&lt;?php echo $m_name; ?&gt;&lt;/th&gt;
      &lt;/tr&gt;
      &lt;tr class="odd"&gt;
        &lt;th&gt;Formula&lt;/th&gt;
        &lt;td width="80%"&gt;&lt;?php echo $formula; ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="odd"&gt;
        &lt;th&gt;Alias&lt;/th&gt;
        &lt;td&gt;&lt;?php echo $alias; ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="odd"&gt;
        &lt;th&gt;In groups&lt;/th&gt;
        &lt;!-- join() == implode() --&gt;
        &lt;td&gt;&lt;?php echo join($group_names, ",&amp;nbsp; "); ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;&lt;br /&gt;&lt;br /&gt;
  </code></pre>
  
  <p>but I get these error message:</p>
  
  <pre><code>Notice: Undefined variable: group_names in eval() (line 97 of D:\xampp\htdocs\drupal\modules\php\php.module(80) : eval()'d code).
  Warning: join() [function.join]: Invalid arguments passed in eval() (line 97 of D:\xampp\htdocs\drupal\modules\php\php.module(80) : eval()'d code).
  Notice: Undefined variable: group_names in eval() (line 97 of D:\xampp\htdocs\drupal\modules\php\php.module(80) : eval()'d code).
  Warning: join() [function.join]: Invalid arguments passed in eval() (line 97 of D:\xampp\htdocs\drupal\modules\php\php.module(80) : eval()'d code).
  </code></pre>
  
  <p>Anyone can help me? Thanks a lot....</p>