-   
-   
- <?php 
- echo"       <form action='arreglos.php' method='POST'> 
-             <input type='text' name='texto'><hr> 
-             <input type='submit' name='OK' value='guardar'>     
-             <input type='submit' name='OK' value='desplegar'> 
-         </form>"; 
- $OK=$_POST[OK]; 
- if($OK=="guardar") 
-     { 
-         $indice=$indice+0; 
-         $arreglo[$indice]=$_POST[texto]; 
-         $indice++; 
-     } 
- if($OK=="desplegar") 
-     { 
-         for($j=0; $j<=COUNT($arreglo); $j++) 
-             { 
-                 echo"$arreglo[$j]<br>"; 
-             } 
-     } 
- ?> 
-   
-   
-