ThomasJSmart
Programmer
- Sep 16, 2002
- 634
im having a small array problem,
$array = 1,2,2,3,1,2,2,4,1,4,4,4
(where each number is a seperate var)
i know the total, $total = count($array), returns 12
but how do i count how many of each vars there are in the aray?
im trying to get it to echo the contents of the array but i dont wont vars repeating.
final echo would be something like this:
1 (3x)
2 (4x)
3 (1x)
4 (4x)
im kinda stuck tho, any help much apreciated
thanks,
Thomas
I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
$array = 1,2,2,3,1,2,2,4,1,4,4,4
(where each number is a seperate var)
i know the total, $total = count($array), returns 12
but how do i count how many of each vars there are in the aray?
im trying to get it to echo the contents of the array but i dont wont vars repeating.
final echo would be something like this:
1 (3x)
2 (4x)
3 (1x)
4 (4x)
im kinda stuck tho, any help much apreciated
thanks,
Thomas
I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!