Think this is what u want

Imran Asghar wrote:
Hi,
Is not working, is it correct way????


File1.php
       <? $colors = array('red','blue','green','yellow'); ?>
       <form action="file2.php" method="post">
      <input type="hidden" type" name="colors" value="<?=$colors?>">
      </fomr>

<?php $colors = array('red','blue','green','yellow'); ?> <form action="file2.php" method="post"> <?php foreach $colors as $k => $v { ?> <input type="hidden" type" name="colors[<?php echo $k; ?>]" value="<?php echo $v; ?>"> <?php } ?> </form>


File2.php
<? echo $colors[0];
echo $colors[1];
echo $colors[2];
echo $colors[4];
?>
<?php
        echo $_POST['colors'][0];
        etc ....
?>



imee



-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to