Horje
How to extract first Five Line from CSV File | PHP Tutorial Code
Follow the Example.

index.php
Example: PHP
<?php
$maxLines = 5;
$file_handle = fopen("file.csv", "r"); // Here put CSV File Location

for ($i = 0; $i < $maxLines && !feof($file_handle); $i++)
{
    $line_of_text = fgetcsv($file_handle, 1024);
    print '<div class="ticker_price">'. $line_of_text[0] . "</div>";
}
fclose($file_handle);
?>

Output should be:

How to extract first Five Line from CSV File




Read Full::
PHP Extract Code
Category:
PHP Tutorial Code
Sub Category:
PHP Extract Code
Uploaded:
2 weeks ago
Uploaded by:
Admin
Views:
5

Related Articles
How to extract first Five Line from CSV File

More Articles
How to get first Five Line from CSV File PHP Extract Code
How to get first 100 records from a csv file in PHP PHP Extract Code

Share on: