![]() |
A small change to your code should read a maximum of five lines. |
<?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);
?>
Category
: |
Web Tutorial |
Sub Category
: |
PHP Extract Tutorial |
Uploaded by
: |
Admin |