I am trying to get my text file to style properly when I output it via php.
my code in index.html is:
<?php include 'read.php'?>
<style>
#text{
height:80%;
}
</style>
In read.php I have:
<?php
$txt = file_get_contents( "2020-1-12 19:36:35.txt" );
echo "<span style='height:80%;'>".$txt. "</span>";
?>
when I look at this with google DevTools, I find that my text, even though inside the span/div element, it does not inherit the properties, so just outputs in a straight line, rather than with new lines like I want it (how it is in the text file, and how it shows up in DevTools). see picture below. In DevTools, this is how I want this to output in the index.html.
outputs as: Student has 1 minutes left on their account. (Tutor) [00:00:06] : asdf a (Tutor) [00:00:06] : sd fa (Tutor) [00:00:06] : sdfasd (Tutor) [00:00:07] : f ew (Tutor) [00:00:07] : rfew f (Tutor) [00:00:07] : as e
all on one line (see below)