title: Notice: Uninitialized string offset:2
body: <pre><code>function forums($name, $id){
  $forums = "";
  $sql = mysql_query("SELECT * FROM ".prefix."FORUM WHERE FORUM_ID = '$id' ") or die(mysql_error());
  if(mysql_num_rows($sql)&gt;0){
      $rs = mysql_fetch_array($sql);
      $forums = Array(
          $rs[CAT_ID], $rs[F_STATUS], $rs[F_SUBJECT]
          );
  }
  if ($name == "CAT_ID"){$nom = 0;}
  if ($name == "STATUS"){$nom = 1;}
  if ($name == "SUBJECT"){$nom = 2;}
  
  
  return($forums[$nom]);
  mysql_free_result($sql);
  
  }
  </code></pre>
  
  <p>I am getting this error:</p>
  
  <blockquote>
    <p>Notice: Uninitialized string offset: 2 in C:\xampp\htdocs\cp_inc\function.php on line 1589</p>
  </blockquote>