cleaning up arrays

From: Date: Mon, 18 Oct 1999 09:50:49 +0000
Subject: cleaning up arrays
Groups: php.dev 
Request: Send a blank email to php-dev+get-11731@lists.php.net to get a copy of this message
I've tried to ask this in the italian php mailing list, but nobody answered. How do I clean up an array, using php3? (array_pop only works on php4) I enclose a piece of source code: echo "<table>"; for($i=0; $i<$nrCols; $i++) { echo "<table>"; fillArray($input[$i], $resultArray); while (list($index, $value)=each($resultArray)) { echo "<tr><td>$value</td></tr>"; } echo "</table>"; } echo "</table>"; ( function fillArray($input, &$output_list) { ... } ) If I try this, if in the first call fillArray() produces an array with 10 items, and the second one 'should' produce an array of 7 items, actually the second array consists of 10 items as well. Should I define a class to get that? Regards, Robero Benedetti

« previous php.dev (#11731) next »