a_young_wife's_computerbook (Javascript and PHP)

PHP while vs for

while: The loop will execute continuously until a condition is met.

Example 1:
<?php
$loop=1
while($loop <= 10)
{
echo "number is $loop<br>";
$loop++;
}
?>

Example 2:
<?php

for($counter=1, counter<=10; $counter++)
{
echo "counting: $counter<br>;
}
?>


Home
Subscribe to: Posts (Atom)

Blog Archive

  • ▼  2011 (1)
    • ▼  March (1)
      • Learning Javascript in 2 days
  • ►  2012 (27)
    • ►  June (27)

Pages

  • Home
  • Javascript Level 1- Basic
  • Javascript Level 2
  • Javascript Level 3-Functions
  • Javascript Level 4
  • Javascript Level 5 - Objects
  • Javascript Level 6 - Math objects
  • Javascript Level 7 - Getting Information from the ...
  • Javascript Level 8 - Interactive buttons and Effec...
  • Useful Computer Learning sites
  • PHP isset( ) vs empty( )
  • PHP is_int( ) and other checking functions
  • PHP or operator
  • PHP elseif
  • PHP switch
  • PHP while vs for
  • PHP arrays
  • PHP in_array
  • PHP key-value pair array
  • PHP other array functions

A Young Wife's links

  • A Young Wife's Computerbook
  • A Young Wife's Cookbook
  • A Young Wife's Notebook
  • A Young Wife's Travelbook
Watermark theme. Powered by Blogger.