Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

recorrer un array php

$lista = array("amaya","julio","javier","nacho","sonsoles");
for (asignacion_inicial, condicion, incremento) { ... }
for ($x=0;$x<count($lista); $x++) { ... }
$lista[indice_elemento];
for ($x=0;$x<count($lista); $x++)
  echo $lista[$x]."<br>";
$tamanio = count($lista);

for ($x=0;$x<$tamanio; $x++)
  echo $lista[$x]."<br>";
 
PREVIOUS NEXT
Tagged: #recorrer #array #php
ADD COMMENT
Topic
Name
7+4 =