Results 1 to 3 of 3

Thread: Questions:

  1. #1
    Corporal STAUFFi's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    269
    Thanks
    106
    Thanked 128 Times in 83 Posts

    Questions:

    Hello, I'm writing after a long time inactive times back.
    I have a question.
    How read text out of a file and then paste it into the correct column?
    (These are the columns)
    Click image for larger version. 

Name:	Unbenannt1.PNG 
Views:	17 
Size:	2.4 KB 
ID:	468
    This is my script
    Code:
     <?php
    $datei=fopen("spiele-b.txt","r+");
    while(!feof($datei))
    {
    $zeile = fgets($datei,1000);
    echo $zeile."<br>";
    }
    fclose($datei);  
    ?>
    The first column of the first set no longer works at "home" but afterwards.
    It should come at the end of it as out.
    (In the last image, the clubs and days are entered manually by "<td> </ td>". )
    Click image for larger version. 

Name:	Unbenannt.PNG 
Views:	18 
Size:	9.5 KB 
ID:	469

    Big thanks for help after
    Greets STAUFFi

  2. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Well, you can serialize your data in JSON e.g. and save/load that, but this is exactly what databases are good for.
    timescale 0.01

  3. #3
    Corporal STAUFFi's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    269
    Thanks
    106
    Thanked 128 Times in 83 Posts
    The sentences in the text file that can be located to vary the the simple php script reads out the individual variable?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •