Anybody see any reason the following code should be acting funny?
while($row = mysql_fetch_assoc($taskRatingsData)) {
$careerTaskRatings[] = $row;
}
foreach($careerTaskRatings as $rating) {
if($rating['Recommend Suppress']='N' && $rating['Scale ID']='IM') {
echo '<pre>';
print_r($rating);
echo '</pre>';
}
}
So, $careerTaskRatings is a multidimensional array created with data from a mysql database. Taking out the if() statement altogether prints each database row as a separate array. Funny thing is if I only have one condition in the if statement, everything works as expected, only printing the rows with the indicated value. However, adding multiple conditions starts making things weird. PHP changes the value of $rating['Recommend Suppress'] in every iteration to '1'.
Any thoughts as to what I'm missing?
Philip