Welcome to GuardiansWorlds.com
 
 

  User Info Box

Anonymous
216.73.216.81
Nickname:

Password:

Security Code:
Security Code
Type Security Code:


User Stats:
Today: 0
Yesterday: 0
This Month: 0
This Year: 0
Total Users: 117
New Members:
Online Now:
  Guests: 32
216.73.xxx.xx
125.228.xxx.xx
85.208.xx.xxx
185.233.xxx.xxx
114.119.xxx.xx

  Total Online: 32
Server Time:
Dec 10, 2025
01:36 pm UTC
 

  Modules/Site Links

· Home
· Bible-MM
· Birds-MM
· Car_Show-MM
· Christmas-MM
· Content
· Domaining-MM
· Downloads
· Drugs-MM
· Event Calendar
· FAQ
· Feedback
· Fish-MM
· Gambling_Guide-MM
· Guardians Worlds Chat
· HTML_Manual
· Internet_Traffic_Report
· IP_Tracking Tool
· Journal
· Members List
· Movies-MM
· Music_Sound-MM
· NukeSentinel
· PHP-Nuke_Tools
· PHP_Manual-MM
· PING Tool
· Private Messages
· Recommend Us
· Reptiles-MM
· Search
· SEO_Tools
· Statistics
· Stories Archive
· Submit News
· Surveys
· Top 30
· Topics
· Visitor Mapping System
· Web Links
· Webcams
· Web_Development-MM
· YahooNews
· YahooPool
· Your Account
 

  Categories Menu

· All Categories
· Camaro and Firebird
· FTP Server
· New Camaro
· News
· Online Gaming
 

  Survey

Which is your favorite generation Camaro or Firebird?

1st Gen. 67-69 Camaro
2nd Gen. 70-81 Camaro
3rd Gen. 82-92 Camaro
4th Gen. A 93-97 Camaro
4th Gen. B 98-2002 Camaro
1st Gen. 67-69 Firebird
2nd Gen. 70-81 Firebird
3rd Gen. 82-92 Firebird
4th Gen. A 93-97 Firebird
4th Gen. B 98-2002 Firebird



Results
Polls

Votes: 71
Comments: 0
 

  Cluster Maps

Locations of visitors to this page
 

  Languages

Select Interface Language:

 

 
  fgetcsv

fgetcsv

(PHP 3 >= 3.0.8, PHP 4, PHP 5)

fgetcsv -- Gets line from file pointer and parse for CSV fields

Description

array fgetcsv ( resource handle [, int length [, string delimiter [, string enclosure]]] )

handle

A valid file pointer to a file successfully opened by fopen(), popen(), or fsockopen().

length (Optional)

Must be greater than the longest line (in characters) to be found in the CSV file (allowing for trailing line-end characters). It became optional in PHP 5. Omitting this parameter (or setting it to 0 in PHP 5.0.4 and later) the maximum line length is not limited, which is slightly slower.

delimiter (Optional)

Set the field delimiter (one character only). Defaults as a comma.

enclosure (Optional)

Set the field enclosure character (one character only). Defaults as a double quotation mark. Added in PHP 4.3.0.

Similar to fgets() except that fgetcsv() parses the line it reads for fields in CSV format and returns an array containing the fields read.

fgetcsv() returns FALSE on error, including end of file.

Note: A blank line in a CSV file will be returned as an array comprising a single null field, and will not be treated as an error.

Example 1. Read and print the entire contents of a CSV file

<?php
$row
= 1;
$handle = fopen("test.csv", "r");
while ((
$data = fgetcsv($handle, 1000, ",")) !== FALSE) {
    
$num = count($data);
    echo
"<p> $num fields in line $row: <br /></p>\n";
    
$row++;
    for (
$c=0; $c < $num; $c++) {
        echo
$data[$c] . "<br />\n";
    }
}
fclose($handle);
?>

fgetcsv() has been binary safe since PHP 4.3.5

Note: Locale setting is taken into account by this function. If LANG is e.g. en_US.UTF-8, files in one-byte encoding are read wrong by this function.

Note: If you are having problems with PHP not recognizing the line endings when reading files either on or created by a Macintosh computer, you might want to enable the auto_detect_line_endings run-time configuration option.

See also explode(), file(), pack() and fputcsv().

 
 


 
  Disipal DesignsAnti-Spam
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2002 by me.
You can syndicate our news using the file backend.php or ultramode.txt This site contains info,links,chat,message board/forum for online games,gaming,other features.Check out my servers and stats for Killing Floor, Quake3 Rocket Arenas & Deathmatch,Trade Wars 2002 & FTP server.Camaro/Firebirds, car info.