Reputation: 435
when using a for loop in PHP are the variables used inside available outside of the loop and if not is there a way of doing so?
foreach ($rows as $row){
$name = $row ['surname'];
$validpassword = ($validpassword + 1);
}
Will I be able to use $validpassword outside of the loop?
Upvotes: 1
Views: 59