php help

Out of context: Reply #4

  • Started
  • Last post
  • 16 Responses
  • versa0

    so if i have something like this:

    [?php

    $riderCurr = $_GET['rdr'];
    $dataPath = "../data/riders/riders.txt";

    $ridersData = fopen("$dataPath", "r");

    if($ridersData){
    while(!feof($ridersData)) {
    $allData = fread($ridersData, filesize("$dataPath"));
    }
    fclose($ridersData);
    }

    ?]

    *********

    why can i then have vars in my .txt that are then stored inside of $allData which i can find without having to use a foreach loop, or treating $allData as an array

    ?

    am i making any sense

View thread