Hi, I just learned to query a flat or .txt file into a result ARRAY by
line number using ....


//<?php
// Get a file into an array.  In this example we'll go through HTTP to get
// the HTML source of a URL.
//$lines = file('http://www.w-ifc.com/test/SCORE.TXT');

// Loop through our array, show HTML source as HTML source; and line
numbers too.
//foreach ($lines as $line_num => $line) {
//   echo "Line #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br />\n";
//}

//?> 

and this is the file it processes .....

Stroke
Skeleton Coast
3/5/2005 1.05


        Hole                                1        2        3       
4        5        6        7        8        9        Out
        Par                                3        4        4       
4        4        5        4        4        4        36        Tot   
    Mul        Gim
H- TA_Dom        Bck        P        CL        -11        3        4  
     4        3        4        4        4        4        3        33
       61        0        5







        Back                                234        418        426 
      412        376        546        357        481        413      
 3663
        Middle                                234        418       
426        412        376        546        357        481        413 
      3663
        Forward                                234        418       
426        412        376        546        357        481        413 
      3663
        Junior                                234        418       
426        412        376        546        357        481        413 
      3663
        Ladies                                234        418       
426        412        376        546        357        481        413 
      3663
        Handicap                                17        3        7  
     9        15        5        13        1        11
Conditions - Wind: No Wind  Greens: Soft  Green Speed: Medium




        Hole                                10        11        12    
   13        14        15        16        17        18        In     
  Tot
        Par                                4        4        5       
4        3        5        4        3        4        36        72    
   Mul        Gim
H- TA_Dom        Bck        P        CL        -11        3        3  
     4        3        2        4        3        3        3        28
       61        0        5







        Back                                472        478        630 
      494        201        581        447        213        417      
 3933        7596
        Middle                                472        478       
630        494        201        581        447        213        417 
      3933        7596
        Forward                                472        478       
630        494        201        581        447        213        417 
      3933        7596
        Junior                                472        478       
630        494        201        581        447        213        417 
      3933        7596
        Ladies                                472        478       
630        494        201        581        447        213        417 
      3933        7596
        Handicap                                8        10        2  
     6        12        4        14        18        16
Conditions - Wind: No Wind  Greens: Soft  Green Speed: Medium

Easy Pin Positions

=======================================

I have run this script and it executes (successfully) as stated.
Though now, im a little lost of the variables aspect and how to
address and use them properly.

My question as a new amatuer programmer is ...

"What direction do I need to go to use the variables assigned so that
I can store the info that the script has read into the mySQL DB?"  as
I would like to keep it functions correct to standard.

Thanks ahead for your valuable time.

Wik

Please, I'm new and I appreciate your patients if this was the WRONG
list to post this too. I'm sorry.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to