So i want to output a title of a document and some text after it from my CSV file!..
But i keep getting the format for the title/$line_of_text[0] :
for where i want the un-fomated text still nesting around the text/$line_of_text[3] should be!<?PHP
$file_handle = fopen("test.csv", "r");
while (!feof($file_handle) ) {
$line_of_text = fgetcsv($file_handle, 1024);
print "<h2>" . $line_of_text[0] . "</h2></div>\n" . $line_of_text[3] . "<br>";
}
fclose($file_handle);
?>
So this is how i want it to output :
<h2>Title</h2></div>
The main text
<br>
But this is what i get :
<h2>Title</h2></div>
<br><h2>The main text</h2></div>
<br>
So obviously im getting a loop that i dont understand!.
Link where i found this code : http://www.homeandlearn.co.uk/php/php10p6.html