SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    so what does this do then (code revisited)



    just came accross some old code of mine ... so pop quiz , what does it do , and what is wrong with it ? , eg what does it not do very well that is supposed to do ? and how hard should I beat myself for using it a)in the first place & b)without comments

    also a simpler solution would be appreciated !



    PHP Code:
    <?
    $str 

    @
    implode' , ' array_slicearray_unique( @explode',' str_replace' ' ',' $str ) ) ) ,0,10 ) ) ;
    ?>
    no prizes , answers on a postcard please

  2. #2
    does not play well with others frezno's Avatar
    Join Date
    Jan 2003
    Location
    Munich, Germany
    Posts
    1,391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by firepages
    answers on a postcard please
    sorry, no answer, no address provided
    We are the Borg. Resistance is futile. Prepare to be assimilated.
    I'm Pentium of Borg.Division is futile.Prepare to be approximated.

  3. #3
    PHP manual bot bronze trophy Gaheris's Avatar
    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,195
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have a values seperated in a string by a blank, you replace the blank with a , take every value, throw out the double values, take thr first 10 words and put them together into a string seperated by a , and blanks.
    I guess you created keywords out of some text?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •