> what function is used to remove an array element from an array?  Like
> array_pop(), except one by which I can refer to the element by its
> associative index rather than just the last element of the array.

   unset($array['index']);

>      echo "<select name=\"home_div_id\">\n";
>      echo "<option value=\"$home_div_id\"
> selected=\"yes\">$div_name</option>\n";
>      while ($temprow = mysql_fetch_array($tempresult)) {
>          echo "<option value=\"" . $temprow['div_id']
>                . "\">" . $temprow['div_name'] . "</option>\n";
>      }
>      echo "</select>\n";

Why not just add a simple check inside that while loop?

   if($temprow['div_id'] != $home_div_id)
      echo "<option value=\"" . $temprow['div_id']
          . "\">" . $temprow['div_name'] . "</option>\n";


Seems more logical to me than to mess with the array itself.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to