my improved code:: array data
| From: | Imran Asghar | Date: | Thu, 12 Feb 2004 18:43:41 +0000 |
| Subject: | my improved code:: array data | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-177476@lists.php.net to get a copy of this message | ||
Thnx everyone,
My improved code, which is working fine
File1.php
<?
$colors =
array('red','blue','green','yellow');
$serial_colors = serialize($colors);
$serial_colors= rawurlencode($serial_colors);
?>
<form action="file2.php" method="post">
<input type="hidden" type" name="serial_colors"
value="<?=$serial_colors?>">
</fomr>
File2.php
<?
$Outserial_colors= unserialize(rawurldecode($serial_colors));
echo $Outserial_colors[0];
echo $Outserial_colors[1];
echo $Outserial_colors[2];
echo $Outserial_colors[4];
?>
Best regards
imee
MSN: imran@ushnah.com