On Monday 16 May 2005 17:26, mayo wrote: > I'm having a little problem adding to an array. Each time I add to an > array it wipes what was previously added. I'm using array_push(). > > $items=array(); > $items=array_push($items, $_POST["whatever"]); Don't assign the result of the array_push() function to $items. That's the reason for flushing the array. try: if (array_push($items, $_POST['whatever'])) { // something } > > I'm missing something easy. > > thx -- Cyberly yours, Petar Nedyalkov Devoted Orbitel Fan :-) PGP ID: 7AE45436 PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436
Attachment:
pgpJ6S3dCYnJU.pgp
Description: PGP signature