Filling up an array with empty elements

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • laredotornado@zipmail.com

    #1

    Filling up an array with empty elements

    Hello,

    I am trying to parse a CSV file. I am counting on the fact that there
    will be 10 entries per row

    while (($data = fgetcsv($handle , 1000, ",")) != FALSE)
    {

    but that is not always true. Sometimes the array has less elements.
    After I get my $data array, what is the quickest way to fill it up with
    empty elements so that the total size is 10?

    Thanks, -Dave

  • Andy Hassall

    #2
    Re: Filling up an array with empty elements

    On 15 Feb 2006 13:52:20 -0800, laredotornado@z ipmail.com wrote:
    [color=blue]
    >After I get my $data array, what is the quickest way to fill it up with
    >empty elements so that the total size is 10?[/color]



    --
    Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
    http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

    Comment

    • Roco3D

      #3
      Re: Filling up an array with empty elements

      take a look in www.phpclasses.org
      is there a lot of scripts to parse csv files

      Comment

      Working...