Your Ad Here

New Post/Thread Notification: PHP Forum

Hello,

welcomewiki has just posted in the PHP Forum forum of Wiki Newforum under the title of PHP Looping.

This thread is located at http://www.wikinewforum.com/showthread.php?t=5857

Here is the message that has just been posted:
***************
*The for Statement*

The for statement is the most advanced of the loops in PHP.
In it's simplest form, the for statement is used when you know how many times you want to execute a statement or a list of statements.
*Syntax*

for (init; cond; incr)
{
code to be executed;
} Parameters:

* *init*: Is mostly used to set a counter, but can be any code to be executed once at the beginning of the loop statement.
* *cond*: Is evaluated at beginning of each loop iteration. If the condition evaluates to TRUE, the loop continues and the code executes. If it evaluates to FALSE, the execution of the loop ends.
* *incr*: Is mostly used to increment a counter, but can be any code to be executed at the end of each loop.

*Note: *Each of the parameters can be empty or have multiple expressions separated by commas.

* *cond:* All expressions separated by a comma are evaluated but the result is taken from the last part. This parameter being empty means the loop should be run indefinitely. This is useful when using a conditional break statement inside the loop for ending the loop.

*Example*

The following example prints the text "Hello World!" five times:
<html>
<body> <?php
for ($i=1; $i<=5; $i++)
{
echo "Hello World!<br />";
}
?> </body>
</html>
*The foreach Statement*

The foreach statement is used to loop through arrays.
For every loop, the value of the current array element is assigned to $value (and the array pointer is moved by one) - so on the next loop, you'll be looking at the next element.


*Syntax*

foreach (array as value)
{
code to be executed;
} *Example*

The following example demonstrates a loop that will print the values of the given array:
<html>
<body> <?php
$arr=array("one", "two", "three"); foreach ($arr as $value)
{
echo "Value: " . $value . "<br />";
}
?> </body>
</html>
***************

Your Ad Here

FREE TRAINING By World's No.1 Site Wikipedia

Hi

Here the SAP HR Real Blue Print: http://www.wikinewforum.com/showthread.php?t=1410


Join us World's Best FREE SAP HR Training @ www.wikinewforum.com


Online Training (Any time you can log-in)

FREE SAP HR TRAINING

WITH REAL TIME SCREEN SHOTS

By World's No.1 Site Wikipedia



Duration: 40 Days Venue: Wikipedia Website

Timings: Any time you can open and can take training

Support: Any time 24/7

We called as Special training because:

  • Real Time Employees will teach & answers your queries
  • Real Time Scenarios
  • Real Time System screen shots step by step configuration
  • Post training support like Resume & Interview tips with exact requirement, we provide top companies HR email ID's and every day vacancy list.

Special Topics apart from general topics:

  • We teach special topics like following where no any dare to reach
  • Payroll & Time Schema's
  • Payroll & Time PCR's (Personal Calculation Rules)
  • Rates of Pay
  • Factoring/Pro-ration
  • Wage type Valuation
  • Time Quota's & Time Types
  • Time Evaluation
  • Absence Valuation
  • Integration wit FICO & other Modules
  • And more and more....list will not stop
  • Totally End-to-End implementation Process

Visit our Website

www.wikinewforum.com

Free Demo

http://www.wikinewforum.com/showthread.php?p=10222#post10222

Reach us

info@wikinewforum.com

Presented

World No. 1 Site - Wikipedia

Our Aim is to provide FREE SAP Training, hope you join.