PHP For Loops and PHP While Loops

preview_player
Показать описание

This tutorial will teach you how to code PHP for loops and PHP while loops. You will learn the difference between for loops and while loops and how PHP applies each type of loop along with conditional statements.

(0:00) Intro
(0:26) Start Apache in the XAMPP control panel
(1:16) Adding PHP to your page
(1:35) Create a PHP while loop
(3:00) Create a PHP for loop
(5:55) Loop through PHP array values with a while loop
(8:11) Loop through PHP array values with a for loop

📺 Learn Web Dev at these sites:

✅ Follow Me:

Was this tutorial about PHP for loops and PHP while loops helpful? If so, please share. Let me know your thoughts in the comments.

#php #for #loops
Рекомендации по теме
Комментарии
Автор

Your explanation is always better and easy

crinceebelempou
Автор

Thank you man you explained it very well

samiramirsamor
Автор

Wonderfully done. I have a question. Assuming I want to use one submit button to send unique content to user emails already registered in my database. How do I command while loop to send the unique or dynamic information to their different email address by the click on a button.

To explain further.
Assuming I want to send my students' grades to their phone number. If I select their phone number and grades from database, how do I use while loop to dynamically run the commands and push their unique grades to their phone using pho while loop as u just taught

qwebbuilder
Автор

Dave I have a class that requires me to write programs in a text editor, but save the file in .txt; how do I do that?

asapkode
Автор

Nice short tutorial,
I believe $i is for Incrementor not Integer because I think we can increment $i by fractions.

ahmad-murery
Автор

I was already tired to type <?php ?> so I did a snippet in VSC
triggered by typing <? and a space.
"PHP Tags": {
"prefix": " ",
"body": ["php", "$1", "?>"],
"description": "Inserts PHP tags"
}
I was searching for a php tab snippet but I didn't find

consciencedimension
Автор

PROBLEM: Please it is only printing the first value in the array. What could be the reason. ?

<?php
$counter = 0;
$message = "";
$arr = array("felix", "Atsu", "Kofi", "Akuayi");

while($counter < count($arr)){
echo $arr[$counter] . "<br";

$counter++;


}

?>

felixackuayi
Автор

First comment! (I've wanted to do that for so long)

ButImFeelingMuchBetterNow
Автор

Nive video, so we got John wick teaching php 😃

AK-jpbm