Curso de PHP🐘 y MySql🐬 [23.- Ciclos indeterminados con while y do while]
En este tutorial vamos a aprender a distinguir os ciclos indeterminado y determinados. Ademas aremos un ejemplo de un ciclo indeterminado con while y do while.
Codigo: https://github.com/programadornovato/php/commit/df20dda974f8cab4da2c087228c123f798a909dc
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> <title>Tutorial While</title> </head> <body> <!-- <div class="container"> <div class="row"> <div class="col-12"> <?php $num = 1; //repetir miestras num(1) menor o igual a 5 while ($num <= 5) { ?> <div class="alert alert-primary" role="alert"> <strong><?php echo $num; ?></strong> </div> <?php $num++; } ?> <div class="alert alert-primary" role="alert"> <strong><?php echo "finalmente " . $num; ?></strong> </div> </div> </div> </div> --> <div class="container"> <div class="row"> <div class="col-12"> <?php $num = 7; do { ?> <div class="alert alert-primary" role="alert"> <strong><?php echo $num; ?></strong> </div> <?php $num++; } while ($num <= 5) ?> <div class="alert alert-primary" role="alert"> <strong><?php echo "finalmente " . $num; ?></strong> </div> </div> </div> </div> </body> </html>
? Esta lista de reproducción: https://www.youtube.com/playlist?list=PLCTD_CpMeEKS2Dvb-WNrAuDAXObB8GzJ0
Codigos en gdrive: https://drive.google.com/file/d/1tQwYvfL2jiUFc6beTWkOkGmXkq5zzFw2/view?usp=sharing
Gracias por apoyar este canal: https://www.patreon.com/programadornovato?fan_landing=true
? Facebook: https://facebook.com/ProgramadorNovatoOficial
? Twitter: https://twitter.com/programadornova
? Linkedin: https://www.linkedin.com/in/programadornovato/
? Instagram: https://www.instagram.com/programadornovato/
Ave que vuela, a la cazuela.