Re: Simple array question, array delete
| From: | Satyam | Date: | Wed, 06 Apr 2005 14:06:03 +0000 |
| Subject: | Re: Simple array question, array delete | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-212422@lists.php.net to get a copy of this message | ||
Anyway, as the replies already show, you have to have a key to identify the
record to be deleted, otherwise, I don't see there can be a way. Why don't
use the data as key as well?
Satyam
"Ryan A" <ryan@coinpass.com> wrote in message
news:000301c53aa9$d8685f50$2d80aa51@lp1wmxd2osbwee...
> Hey,
> I have a $data_recs array like this:
>
> 12
> 445
> 45655
> 4
> 3466663
> etc
>
> when the user gives me a number, i have to check if its in the array and
> delete that entry...how do i do that?
> I have looked at the manual but have gotten confused with array
> pop,splice,array_key_exists etc
>
> Thanks,
> Ryan
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.9.3 - Release Date: 4/5/2005