Results 1 to 10 of 11
-
19th Mar 2010, 02:51 PM #1OPMemberWebsite's:
maxneeds.infoAdvice ?
Hi guys !
Lets say that i have a .txt file full with words.
Some of the words are repeating few times.
How can i show all unique words (without the repeating ones) with javascript ?
If can't with javascript with php then ?
Word
Word
Word
OtherWord
3rdWord
Showing....
Word
OtherWord
3rdWordPorsche_maniak Reviewed by Porsche_maniak on . Advice ? Hi guys ! Lets say that i have a .txt file full with words. Some of the words are repeating few times. How can i show all unique words (without the repeating ones) with javascript ? If can't with javascript with php then ? Word Word Word Rating: 5
-
19th Mar 2010, 03:01 PM #2MemberWebsite's:
tufos.netJust in case... are you trying to make a tagcloud based on a txt file and handled by a php script?
or I am wrong ? :$
-
19th Mar 2010, 03:03 PM #3OPMemberWebsite's:
maxneeds.infoNo,but sounds smart thought
I am trying to show the online member names,but they are repeating in the text file.
-
19th Mar 2010, 05:44 PM #4OPMemberWebsite's:
maxneeds.infoAnyOne ?
-
19th Mar 2010, 05:55 PM #5Member
$names = array_unique($names); //removes duplicates
-
19th Mar 2010, 06:44 PM #6OPMemberWebsite's:
maxneeds.infoGav0 - hmm how can i use this when it's external html file with usernames stored as this
Name<br />
Name<br />
Name<br />
Name2<br />
Name3<br />
-
19th Mar 2010, 09:25 PM #7Member
Something like this
Code:<? $userfile= file_get_contents("testfile.html"); $users = explode("<br />",$userfile); $users = array_unique($users); foreach ($users as $user) { list($name) = explode(" ", $user); echo "$name"; } ?>
im sure someone will come up with somthing better
-
20th Mar 2010, 08:10 AM #8OPMemberWebsite's:
maxneeds.infoThanks Gav0... And how do i remove the first item from the array ?
Because look what i get...
link
-
20th Mar 2010, 02:36 PM #9MemberCode:
<? $userfile= file_get_contents("testfile.html"); $users = explode("<br />",$userfile); $users = array_unique($users); foreach (array_slice($users, 1) as $user) { list($name) = explode(" ", $user); echo "$name"; } ?>
-
20th Mar 2010, 03:50 PM #10OPMemberWebsite's:
maxneeds.infoGav0,thank you very much for your efforts to help me
Works like charm
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
A little help/advice
By MrOSX in forum General DiscussionReplies: 0Last Post: 29th Oct 2011, 11:26 PM -
Need a little advice!
By cyb3r in forum Webmaster DiscussionReplies: 8Last Post: 27th Jul 2011, 04:35 AM -
need some advice
By ancraz in forum Webmaster DiscussionReplies: 1Last Post: 10th Aug 2010, 09:48 PM -
Need Advice & Little Help Plz :( ???
By cyb3rgh0st_ in forum Completed TransactionsReplies: 5Last Post: 10th Jan 2010, 04:54 PM
themaCreator - create posts from...
Version 3.24 released. Open older version (or...