Suppose I have an array.
$array1 = array(\'John\',\'Mike\',\'Tim\',\'Dan\');
Using a foreach
iteration, I\'m looping through $ar
Use a variable to keep that information in
$firstTime = true;
foreach ($array1 as $key => $value) {
$dbQueryResult = true; // or false depending on iteration
if($dbQueryResult === true){
// HOW DO I CHECK IF IT IS THE FIRST TIME I'M GETTING HERE
if ( $firstTime ) {
// do first time stuff
$firstTime = FALSE;
}
}
}