in this double condition [else if($test1[0] == "Regular Project" && $test1[0] == "FSA Project")] is not working properly. this is the way to do . or in_array i have to use.
$sql1 = "SELECT Select_Type,Prj_Id,Status FROM PROJECT_ACTIVE WHERE Memr_Id='$data[0]'";
$test = mysql_query($sql1);
$test1 = mysql_fetch_array($test);
/*echo "<select name='selecttype'>";
for($i=0;$i<3;$i++)
{
echo " value ".$test1[0];
echo "value 1".$a[0];
if(in_array($test1[0], $a[i])){
continue;
}
else
{
echo "<option value='$a[i]' >$a[i]</option>";
}
}
echo "<select>";*/
if($test1[0] == "Regular Project"){
echo "<select name='selecttype'>
<option value='TGF Project'>TGF Project</option>
<option value='FSA Project'>FSA Project</option>
</select>";
}
else if($test1[0] == "FSA Project")
{
echo "<select name='selecttype'>
<option value='Regular Project'>Regular Project</option>
<option value='TGF Project'>TGF Project</option>
</select>";
}
else if($test1[0] == "TGF Project")
{
echo "<select name='selecttype'>
<option value='Regular Project'>Regular Project</option>
<option value='FSA Project'>FSA Project</option>
</select>";
}
else if($test1[0] == "Regular Project" && $test1[0] == "FSA Project"){
echo "<select name='selecttype'>
<option value='TGF Project'>TGF Project</option>
</select>";
}
else if($test1[0] == "Regular Project" && $test1[0] == "TGF Project"){
echo "<select name='selecttype'>
<option value='FSA Project'>FSA Project</option>
</select>";
}
else if($test1[0] == "FSA Project" && $test1[0] == "TGF Project"){
echo "<select name='selecttype'>
<option value='Regular Project'>Regular Project</option>
</select>";
}
else
{
echo "<select name='selecttype'>
<option value='Regular Project'>Regular Project</option>
<option value='FSA Project'>FSA Project</option>
<option value='TGF Project'>TGF Project</option>
</select>";
}