Re: cleaning up arrays

From: Date: Mon, 18 Oct 1999 10:29:20 +0000
Subject: Re: cleaning up arrays
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-11732@lists.php.net to get a copy of this message
At 11:50 18-10-99 Monday , Roberto Benedetti wrote: Hiya 1 use another name of the output array ($resultArray2) or 2 clear result array with $resultArray = ""; or 3 make your function like this: ( function fillArray($input) {
        ...
    }
        return ($output_list)
) Greetz, wico
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
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.dev (#11732) next »