Forum Moderators: coopster
i need to read from a text file that contains a receipe. frst line is name of dish, second line is name of contributor if receipe. the rest is the content of receipe.
i can retrieve the title and name using file() but how do i get the rest of the content? i mean with file(), they are all in array, but i need to joisn them. but is htere anotehr way of ahieveing this..?
<?php
$receipe= $_GET['receipe'];
$receipe_file = "receipes/$receipe";
$content_array = file($receipe_file);
echo "<font class=\"subtitle2\">$content_array[0]</font><br />";
echo "<font class=\"subtitle\">$content_array[1]</font><br />";
//$fh = fopen($receipe_file, 'r');
//$size = filesize($receipe_file);
//echo $size;
//$content = fread($fh, $size);
//fclose($fh);
//echo $content;
?>