1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

please i need your help

Discussion in 'General Scripting Chat' started by wavex159, Aug 10, 2015.

  1. wavex159

    wavex159 Newbie

    Joined:
    Mar 6, 2015
    Messages:
    8
    Likes Received:
    0
    Good day please i just wanted to know if some can help me write a php script that takes data from a big from(e.g a select of numbers, one set of numers e.g-3456789 per line or they can be comma seperated) and uses them to form an array that i can perform an operation on such as me displaying them.
    Please i would really appreciate your help.
     
  2. MrBlue

    MrBlue Senior Member

    Joined:
    Dec 18, 2009
    Messages:
    974
    Likes Received:
    680
    Occupation:
    Web/Bot Developer
    This should get you started:
    Code:
    <?php
    $file = fopen('myFile.csv', 'r');
    $array = array();
    while (($line = fgetcsv($file)) !== FALSE) {
      $array[] = $line;
    }
    fclose($file);
    ?>