when I try to do something like this:
----------index.php----------
<?php
//The position values
$helpDesk = "Call Center,
Help Center,
Walk ups";
//the start of a drop down list
echo"<select name=\"position\">"
//explode to tell the values apart
explode(",", $helpDesk);
//actually listing the values in the drop down list
foreach($helpDesk as $item)
{
echo"<option>$item</option>";
}
echo"</select>";
?>
----------form.php----------
<?php
//explode the values again to tell them apart
explode(",", $helpDesk);
//in_array so that we can compare values
if(in_array($position, $helpDesk)
{
include("helpdesk.php");
}
else
{
include("library.php");
}
?>
Now why do I keep getting the error "Wrong datatype for second argument in call to in_array()" ??????? I dont see anything wrong with this code...do any of you? If so, please fix for me... =)