Much like the if statement, it will check if one item equals the other item.
echo"The two items are the same";
You can also check to see if they do not equal, or greater/less to each other.
echo"The two are not the same";
With using the while statement, the best usage that I use it for is when I am counting numbers. Example 3 will count the numbers until the two items become equal.
while($count != $target)
This will repeat the $count plus 1 until $count =15.
No swearing, link posting, adult oriented, or illegal posts.
1 post • Page 1 of 1