Hi,
I have a little problem that has been niggling me for ages, and now I finally have to face it...
I have two arrays, one with a URL in it, the second with the number of visitors from that URL. So my array's might look like this:
google.com - 18 visitors
yahoo.com - 10 visitors
msn.com - 7 visitors
etc.
Problem is, urls that aren't search engines often are too long (as referrers) to display nicely in my website, so I shortened them.
So a link from www.hotscripts.com/blahblahblah.htm would be shortened to just 'hotscripts.com'
(oh, and does anyone know of a good way to shorten a URL, even if it is a .de or .fr etc?).
Now, I might have several links from hotscripts.com, so my table ends up showing several hotscrips.com urls, and I don't want this...
Is there a way to delete the duplicate values in my new array, but add up the corrosponding number of visitors from the other array, so that
hotscripts.com - 10 vis
hotscripts.com - 7 vis
could turn into
hotscripts.com - 17 vis????
Thanks for any ideas!
Yari