How can we use a condition inside a foreach loop

Saturday, July 5, 2014

My question is that can we use OR in a php foreach loop or is there any syntax similar to it....something like the following ??



foreach ($value['media']['options']['Colors'] OR ($value['media']['options']['colors'] as $colors) {
$stmt->execute(array(':pid' => $PID, ':color' => $colors));
}






http://ift.tt/1pRtujq