Development PHP help please?

Discussion in 'Software' started by A[L]C, 9 Nov 2005.

  1. A[L]C

    A[L]C What's a Dremel?

    Joined:
    23 Oct 2001
    Posts:
    293
    Likes Received:
    0
    Hi all,

    Im trying to read text from a text file. Can someone tell me why this doesnt work?

    Thanks

    PHP:
    <?php
    $file 
    'fileDataEx.txt'
    $data file($file) or die('Could not read file!'); 
    foreach (
    $data as $line) { 
    echo 
    "<p class=\"style\" style=\"margin-top: 0; margin-bottom: 0\">";$line."<br></p>"
    }
    ?>

     
  2. RTT

    RTT #parp

    Joined:
    12 Mar 2001
    Posts:
    14,120
    Likes Received:
    74
    PHP:
    <?php
    $file 
    'fileDataEx.txt';
    $data file($file) or die('Could not read file!');
    foreach (
    $data as $line) {
    echo 
    "<p class=\"style\" style=\"margin-top: 0; margin-bottom: 0\">".$line."<br></p>";
    }
    ?> 
    Fixed :)
     
  3. A[L]C

    A[L]C What's a Dremel?

    Joined:
    23 Oct 2001
    Posts:
    293
    Likes Received:
    0

Share This Page