assigning whole file contents to a variable ?

Discussion in 'PHP' started by chandan123, May 27, 2008.

  1. #1
    how to assign whole file contents to a variable :confused: ?
     
    chandan123, May 27, 2008 IP
  2. Im The ONE

    Im The ONE Peon

    Messages:
    800
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #2
    $abc = file_get_contents(xyz.txt)
     
    Im The ONE, May 27, 2008 IP
    chandan123 likes this.
  3. chandan123

    chandan123 Prominent Member

    Messages:
    11,586
    Likes Received:
    578
    Best Answers:
    0
    Trophy Points:
    360
    #3
    thanks rep added u saved my lot of time because i am starting php still :)
     
    chandan123, May 27, 2008 IP