How to add Prefix to a list of 10k+ words programmatically?

Discussion in 'Programming' started by poseidon, Nov 11, 2007.

  1. #1
    I want to add some prefixed to a list of 10k+ phrases but not sure how to do it. Can I do it in Excel ? I tried to use concatenate function but it don't concatenate two columns. ANy help will be highly appreciated :)

    Actually if I can read strings one by one using PHP than I can easily do it. I just need to know how to open file and start reading line by line in PHP.

    I really have to brush up my shell programming skills :)
     
    poseidon, Nov 11, 2007 IP
  2. bquast

    bquast Active Member

    Messages:
    275
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    78
    #2
    same thing here fopen was the best way to do things, lost my ways, when my laptop crashed (had a script on their I was working on for a year and a half, stopped coding when it crashed) and fread flat file databases were the best experience I ever had with php.
     
    bquast, Nov 11, 2007 IP
  3. pubdomainshost.com

    pubdomainshost.com Peon

    Messages:
    1,277
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can do it in excel, it does allow concat,
    or create a table in mysql, and use PHP to update the table with prefix+result,
    in fact you can concat with mysql itself, no need for PHP, unless you want the flexiblity to modify it at some stage later on.

    Cheers
    GS
     
    pubdomainshost.com, Nov 11, 2007 IP
  4. poseidon

    poseidon Banned

    Messages:
    4,356
    Likes Received:
    246
    Best Answers:
    0
    Trophy Points:
    0
    #4
    hi GS, can u tell me how to do it in excel ? If I can use excel than this will solve all the problem.
     
    poseidon, Nov 11, 2007 IP
  5. pubdomainshost.com

    pubdomainshost.com Peon

    Messages:
    1,277
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Assuming A has your prefix (i hope it is common for all) and B has existing phrases. Now to display it as A+B in excel, all you need to do is type in C =A1&""&B1 and drag it all the way down.
    C would contain A+B and you can then select C and save value.

    HTH
     
    pubdomainshost.com, Nov 11, 2007 IP
    poseidon likes this.
  6. poseidon

    poseidon Banned

    Messages:
    4,356
    Likes Received:
    246
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks alot, works like a charm :)
     
    poseidon, Nov 11, 2007 IP
  7. webgeekent

    webgeekent Peon

    Messages:
    60
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    i had a macro built to do this is thats any good?
     
    webgeekent, Nov 12, 2007 IP