La descarga está en progreso. Por favor, espere

La descarga está en progreso. Por favor, espere

Programación PHP while saregune CC 2009.

Presentaciones similares


Presentación del tema: "Programación PHP while saregune CC 2009."— Transcripción de la presentación:

1 programación PHP while saregune CC 2009

2 definición while (mientras)
Es una estructura que permite repetir instrucciones.

3 robotijo tarea: cruzar la calle

4 cruzar la calle mientras haya coches espera // Ya no hay coches.
// Puedes cruzar mientras no he llegado paso adelante

5 while while ( hay_coches() ) { wait (5); //segundos } // wait ..sleep

6 while while ( hay_coches() ) { wait (5); ... }

7 while while ( expresión ) { instrucciones; } expresión: e. boolena instrucciones: lista.

8 correo

9 correo mientras haya correo repartelo;

10 correo while ( haya_correo() ){ repartir_correo(); } // y la carta?

11 correo coge una carta mientras tengas carta reparte carta; coge carta;

12 correo con carta $carta = get_carta( $saco); while ( $carta ) {
repartir ($carta); $carta = get_carta( $saco) }

13 correo eficaz $carta = get_carta( $saco); while ( $carta ) {
repartir ($carta); $carta = get_carta( $saco) } // Versión rápida while ( $carta = get_carta( $saco) ) {

14 consulta bd // realizamos una consulta.
$rsConsulta = mysql_query($cSQL); echo "<ul>";.. while ( $dato = mysql_fetch_array( $rsConsulta ) ){ echo "<li>". $dato["nombre"] . "</li>"; } ...

15 WP: The Loop while (have_posts()) { the_post(); // imprimir el post actual. }

16 WP: The Loop while (have_posts()): the_post();
// imprimir el post actual. endwhile; if ( .... ) : ... endif

17 The WP-theme-style <?php while (have_posts()): the_post(); ?>
<etiqueta htmls> <?php endwhile; ?> <?php if ( .... ) : algo; ?> <?php endif ?>


Descargar ppt "Programación PHP while saregune CC 2009."

Presentaciones similares


Anuncios Google