account for break

This commit is contained in:
awesomeuser 2023-08-04 17:48:47 +00:00
parent 8d22f146dd
commit 9cc39a28e2

View file

@ -209,8 +209,8 @@
$myfile = fopen("posts.txt", "r") or die("Unable to open file!");
if ($myfile) {
$index = 0;
while (($line = fgets($myfile)) !== false) {
echo "<div class='post'><h2>" . strip_tags($line) . "</h2>";
while (($line = strip_tags(fgets($myfile))) != " ") {
echo "<div class='post'><h2>" . $line . "</h2>";
echo "<i>" . strip_tags(fgets($myfile)) . "</i>";
echo "<canvas id='c" . $index . "' style='width: 100%;' width='128' height='64'></canvas></div>";