Advertisement
idsystems

PHP_Leccion1.8_03

Jan 19th, 2012
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. <?
  2. /* Creo un array */
  3. $las_vocales = array ('a','e','i','o','u');
  4.  
  5. /* Recorro el array utilizando foreach */
  6. foreach ($las_vocales as $elem) {
  7. print $elem.'<br>';
  8. }
  9.  
  10. print '<br>';
  11.  
  12. /* Es equivalente a realizar */
  13. for ($i=0;$i<count($las_vocales);$i++) {
  14. print $las_vocales[$i].'<br>';
  15. }
  16.  
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement