Im having a problem incrementing a counter in one of my while loops basically i just want to alternate between two image links that were fetched in my database but my counter wo
$i = 0; while($i<5) { $alternateVal = $i%2==0 ? "type1" : "type2"; echo $alternateVal; $i++; }
Above is an example to overview alternate values.