I'm building a super simple PHP CMS, and have a question about formatting text...
I'm storing my news files in .txt files (should be SQL, I know), and would like to know how to format the text that gets saved in the text file. This is the code that stores the lines that I want to format:
$newsTitle = isset($_POST["title"]) ? $_POST["title"] : "Untitled";
$submitDate = date("m/d/y g:iA");
I want to wrap the first line in an <h2>
and the second line in an <h3>
, but I have no idea how. I tried just wrapping the m/d/y g:iA
bit in the second line with a <h3>
but that generated some really weird code in the .txt file.
Thanks!