...

View Full Version : How to clear parameter values



camaross
11-09-2011, 02:26 AM
For the code below, how do I clear the values of $code[], $type[], $description[] after each "for" loop run?

Thank you.


for ($coun=1000; $coun<1200; $coun ++) {

$nu="A" . $coun;
$extract=mysql_query("SELECT * FROM $table WHERE code='$nu' ORDER BY id ASC");
$number=mysql_numrows($extract);

while($row = mysql_fetch_array($extract)){
$number[] =$row['number'];
$type[] =$row['type'];
$description[]=$row['description'];
}

***codes to display the $number, $type, and $description***

}

kbluhm
11-09-2011, 02:35 AM
unset( $number, $type, $description );

camaross
11-09-2011, 02:41 AM
Thank you so much for the reply.

It works great!




unset( $number, $type, $description );



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum