uhuh! that worked! :) thanks a lot mates... Im starting to love this thing on PHP that give's us a function to whatever we need... "oh... i need that" *zuuup* "oh.. theres a function to do that!"... :D
again, thanks for the help. Happy new year to all.
User Profile
Collapse
-
ok... so... at the begining i had this string has i spoke in the first post... i dont know the content of the string... i only know that its a bunch of names divided by ','. Using the explode() function i was able to extract into an array all the names.
Now i needed to count how many times the elements repeat themselfs. i used array_count_val ues() function to do it... that returned a associated array with both the names and the quantity...Leave a comment:
-
Ok.. im back again with a new problem...
After using what was suggested before i have now one array with names, and i need to count how many times each name repeats itself and then using that information.
Lets say the first array is (a,b,c,a,d,a,b, e) then, counting the unique elements with array_count_val ues() i get the associative array, which would be ("[a]=>3","[b]=>2","[c]=>1","[d]=>1","[e]=>1)...Leave a comment:
-
Thanks a lot guys... it worked like a charm!
Again, thanks! :) Good weekend and happy new year...Leave a comment:
-
String handling
Hello there, first of all i would like to congratulate you guys for the great job you've been doing.. this site has helped me a lot and lots of times... :)
I'm very newbie to PHP, only started to use this language few days ago, and i have a small answer that i cant seem to find a answer to fullfill my needs...
I have a variable that is a string, which is a group of names divided by ',' and i would like to know if there...
No activity results to display
Show More
Leave a comment: