FOpen And Delet Some Thing

Discussion in 'PHP' started by vOlLvEriNe, Sep 2, 2013.

  1. #1
    I Have Some Paragraph In text.txt File, Spouse This Content Written In File,
    Hi;Hello;How,Are,You,
    Code (markup):
    Please Tell Me, How I Want tO Delete
    How,Are,You
    Code (markup):
    By Using Php
     
    vOlLvEriNe, Sep 2, 2013 IP
  2. cLogik

    cLogik Active Member

    Messages:
    159
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    90
    #2
    $args = 'Hi;Hello;How,Are,You,';
    echo substr($args, 0, strrpos($args, ';'));
    PHP:
    Should work :)
     
    cLogik, Sep 3, 2013 IP
  3. samyak

    samyak Active Member

    Messages:
    280
    Likes Received:
    7
    Best Answers:
    4
    Trophy Points:
    90
    #3
    Are you just looking to remove the text after ";" or the entire process to read and remove the content from the file?
     
    samyak, Sep 3, 2013 IP
  4. vOlLvEriNe

    vOlLvEriNe Member

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #4
    @cLogik I Want Delete These Lines From File ..
     
    vOlLvEriNe, Sep 3, 2013 IP
  5. cLogik

    cLogik Active Member

    Messages:
    159
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    90
    #5
    So you want to read the file's lines, and after every last ; in each line you want to remove the rest of the line and move on to the next line?

    Edit:
    Could the line be like this

    Hello;how;are,you,doing;tonight;are;you,good,or;what;are;you;saying

    Edit: What are you using this for? Seems weird to store text like that.
     
    cLogik, Sep 3, 2013 IP
  6. vOlLvEriNe

    vOlLvEriNe Member

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #6
    I'm Just Doing This For Learning Purpose :p
     
    vOlLvEriNe, Sep 3, 2013 IP