Activity Stream
48,167 MEMBERS
6747 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1.     
    #1
    Member
    Website's:
    maxneeds.info

    Question 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
    OtherWord
    3rdWord

    Showing....

    Word
    OtherWord
    3rdWord
    Porsche_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

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    tufos.net
    Just in case... are you trying to make a tagcloud based on a txt file and handled by a php script?

    or I am wrong ? :$



  4.     
    #3
    Member
    Website's:
    maxneeds.info
    No,but sounds smart thought

    I am trying to show the online member names,but they are repeating in the text file.

  5.     
    #4
    Member
    Website's:
    maxneeds.info
    AnyOne ?

  6.     
    #5
    Member
    $names = array_unique($names); //removes duplicates

  7.     
    #6
    Member
    Website's:
    maxneeds.info
    Gav0 - 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 />

  8.     
    #7
    Member
    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

  9.     
    #8
    Member
    Website's:
    maxneeds.info
    Thanks Gav0... And how do i remove the first item from the array ?

    Because look what i get...
    link

  10.     
    #9
    Member
    Code: 
    <?
      $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";
       }
    ?>

  11.     
    #10
    Member
    Website's:
    maxneeds.info
    Gav0,thank you very much for your efforts to help me

    Works like charm

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. A little help/advice
    By MrOSX in forum General Discussion
    Replies: 0
    Last Post: 29th Oct 2011, 11:26 PM
  2. Need a little advice!
    By cyb3r in forum Webmaster Discussion
    Replies: 8
    Last Post: 27th Jul 2011, 04:35 AM
  3. need some advice
    By ancraz in forum Webmaster Discussion
    Replies: 1
    Last Post: 10th Aug 2010, 09:48 PM
  4. Need Advice & Little Help Plz :( ???
    By cyb3rgh0st_ in forum Completed Transactions
    Replies: 5
    Last Post: 10th Jan 2010, 04:54 PM

Tags for this Thread

BE SOCIAL