I have some code that works, being
$neutral_array = array("NA","Average","Somewhat","Neither agree nor disagree","Neither yes or no");
//
if (in_array($answer,$neutral_array)) {
$sentiment="Neutral";
}
I now want to build this array from a query, like
$neutral_sql = "SELECT Response FROM Sentiments WHERE Sentiment = 'Neutral'";
$neutrals = ExecuteRows($neutral_sql);
How can I process $neutrals into $neutral_array including the string quotes?
This isn't working
foreach ($neutrals as $neutral) {
$neutral_array[] = "'" . $neutral["response"] . "'";
}
if (in_array("NA", $negative_array)) { // if fails, no Log
Log("NA exists ");
}