note 44773 deleted from function.array-pop by sp

From: Date: Tue, 31 Aug 2004 16:00:29 +0000
Subject: note 44773 deleted from function.array-pop by sp
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-75754@lists.php.net to get a copy of this message
Note Submitter: edgardo at luzcando dot com ---- I am not sure if this is the best way, but I could not find a way to clear an array so I used array_pop to do it for me. Use it at your own risk :) Assume $taskTimes is an existing array that you want to reuse (say inside a while loop). <?php $sizeA = sizeof($taskTimes); while ($sizeA > 0) { array_pop($taskTimes); $sizeA--; } ?> I am not a php guru...actually a Java guru getting by with php ... elf

« previous php.notes (#75754) next »