RUVIDEO
Поделитесь видео 🙏

PHP While Loops | Tutorial смотреть онлайн

📁 Обучение 👁️ 16 📅 01.12.2023

Course Title: Web Development Masterclass
Course Link: http://youaccel.com/admin/cdisplay.php?cid=11

Facebook: https://www.facebook.com/youaccel
Twitter: https://twitter.com/YouAccel
Website: http://youaccel.com

Tutorial Content:

With Loops we can execute the same block of code multiple times.

In PHP we have four types of loops statements.

while loop
do...While Loop
for loop
foreach loop
Let's start with an example of the while loop.

Here we have a variable x with its value set to 1.

We have then created a while loop, that will loop continuosly as long as the value of x is less than 10.

Using a post-increment operator inside a while loop, we can keep incrementing the value of x until it reaches it's maximum limit 9.

Since x is initially set to 1, the first time the loop runs the value of x will be 1. The second time it runs x will increment to 2. It will continue this until it reaches a value less than 10 (9).

If we change 10 to 20, we can see the loop now runs 19 times.

If we change the value of x to 5, our starting number will change to 5 as well.

Let's see what happens if we change our x value to 11.

We can see there is no output. The while loop checks to make sure a specified condition is true, before executing the loop.

That's how a basic while loop works.

Now let's take a look at a do...while loop. This type of loop will execute a block of code once - it will then check to see if a condition is true. It will repeat the loop only if the condition is true.

In this example, we have variable x set to the value 6.

We specified the action.. which is to echo the value of x and increment the value of x by 1.

The condition however, is to only repeat the loop if x is less than or equal to 5. In this case the condition is not met, the loop will not execute again.

If x did meet this condition the loop would run, until x no longer met the condition.

We can test this by reducing the value of x.

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «PHP While Loops | Tutorial» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.