There are a number of different ways to loop using PHP. They're as follows:
Below are some examples of how each of these types of loop work.
Forfor ($x = 0; $x < 100; $x++) {
echo $x.'
';
}
?>
Foreach$array = array(1, 5, 8, 2, 9);
foreach ($array as $number) {
echo $number.'
';
}
?>
Whilewhile ($x < 10) {
$x++;
echo $x.'
';
}
?>
Do-whiledo {
$x++;
echo $x.'
';
} while ($x < 10);
?>
The best way to print the numbers 1 to 100 in PHP without using a loop is with the following code: echo implode("<br>", range(1,100)); You can replace the <br> with anything that you want to separate the numbers, such as dashes. I used a line-break in the example.
while, do...while, for, foreach are used
Well it got nothing to do with PHP, you going to need JavaScript to do that :)
PHP is a recursive acronym for "PHP: Hypertext Preprocessor" created by The PHP Group. PHP is a widely used server-side scripting language and the general purpose of PHP is to create dynamic Web Pages. For more information, visit the PHP website.
< ?php // This is an example of comment in PHP /* This is another example of comment in PHP and we can write comments in multiple lines using this method */ ? >
PHP is an Open Source Scripting Language. We can create Web Pages and Web Applications using PHP.
You can use phpMailer() Or, you can use mail() PHP function to send emails via PHP script.
The best way to print the numbers 1 to 100 in PHP without using a loop is with the following code: echo implode("<br>", range(1,100)); You can replace the <br> with anything that you want to separate the numbers, such as dashes. I used a line-break in the example.
You can create blog in php. In fact, many blogs on the internet created using php. There are many readymade blogs which you can install on your own server. Or, if you wish, you can create your own blog application. Simply, blog is a dynamic website (users can add, delete, update content) and PHP was designed for creation of dynamic websites.
PHP is used to create dynamic websites, this is a step up from HTML as it allows you to do much more than creating static websites. Using a language such as PHP also gives you access to using databases with your website such as MySQL.
while, do...while, for, foreach are used
Maybe try mySQL or PHP?
If you are using PHP you could use this code: (In the <head>) <?php HEADER("Location: http://www.rasclerhys.com"); ?> That should automatically take you to "www.rasclerhys.com"
A file with the DIV file extension is a DivX Movie file, it cannot be created with PHP. PHP is a web programming language for web site building.
That question doesn't make much sense...delete for what?
how to create report in php
Create an HTML form with METHOD="post" and ACTION="login2.php". In login2.php check if the entered username and password are correct. You can get the username with $_POST['name_of_username_input']. The same goes for the password.