Skip to content

Instantly share code, notes, and snippets.

@AndreaBarghigiani
Created January 20, 2015 12:09
Show Gist options
  • Save AndreaBarghigiani/a6e364333604874a23ec to your computer and use it in GitHub Desktop.
Save AndreaBarghigiani/a6e364333604874a23ec to your computer and use it in GitHub Desktop.
Esercizio funzione conto_alla_rovescia()
<?php
//Manca proprio tutta la definizione della funzione
function conto_alla_rovescia( $int ){
$int = intval($int); //Mi assicuro che sia un intero
$m = $int; //Mi creo una variabile per contare i passi
for( $i = 0; $i < $m; $i++ ){
echo $int-- . "<br />";
}
}
conto_alla_rovescia( 13 );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment