hi all,
pls help... this is my code from where i can select multiple values and post... but it is not displaying the selected values in multiple dropdownlist... how can i solve this????
<?php
$loc_con1 = array(1=>'ALL','Andaman and Nicobar Islands','Andhra Pradesh', 'Arunachal Pradesh','Assam', 'Bihar','Chandigarh','Chhattisgarh','Dadra and Nagar Haveli','Daman and Diu','Delhi','Goa','Gujarat','Himachal Pradesh','Jammu and Kashmir','Jharkhand','Karnataka','Kerala','Lakshadweep','Madhya Pradesh', 'Maharashtra','Manipur','Meghalaya','Mizoram','Nagaland','Orissa','Pondicherry','Punjab','Rajasthan','Sikkim','Tamil Nadu','Tripura','Uttaranchal','Uttar Pradesh','West Bengal');
$i=0;
?>
<select name="loc_considered[]" multiple="multiple">
<?php
for($j=1;$j<=(count($loc_con1)-0);$j++)
{
if($loc_con1[$j] == $loc_con[$i])
{
echo '<option value="'.$loc_con1[$j].'" selected="selected">'.$loc_con1[$j].'</option>\n';
$i++;
}
else
{
echo '<option value="'.$loc_con1[$j].'" >'.$loc_con1[$j].'</option>\n';
}
}
?>
</select>