Basically I am setting ls > array().  I want each item to be an option in
the array.  I have have scoured for some time now and this is what I have
come up with, but it is not populating each file as an <option>?  The select
box is just empty.  I know this is an array because I have tested with
print_r.  Stuck!

Can someone tell me what I am doing wrong?
$shell_scripts=`ls -1 /sm_scripts|grep -v backup|grep -v outmail|grep -v
$arr1=split("\n", "$shell_scripts");

echo "<p>";
echo "<select name=test>";
function generate_option_list($arr1, $set) {
while (list($key,$value) = each($arr1) ) {
    {$var.="<option value='$key'>$value</option>";}
} return $var;

echo "</select>";


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to