|
-
Oct 27th, 2008, 04:06 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] Create one array from another
Say I got one array:
array('apple', 'banana','apple','orange','orange','apple');
so i got 3 apples, 1 banana, 2 orange
I want to turn this into another array where the key is the fruit name, and the value is the number of times that fruit is in the first array
sth like: array('apple'=>3,'banana=>1,'orange'=>2)
make sense?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|