I'm having a little brain fart and I just want to double check something ...
// Array of [a,b,c,d]
$array = array('a', 'b', 'c', 'd');
// Loop through array
foreach ($array AS $letter)
{
// Break out of the loop on a specific condition
if ($letter == 'c')
{
break;
}
}
echo $letter;
I just want to double check $letter's scope. $letter exists outside of the foreach loop and retains the value of 'c', right?