I am not that good with PHP and have a question for you. I use text area which is tied up to a javascript text editor (turns the text area into simple text editor) and for example I type :
1. Course one
2. Course 2
Then it will save it to database and another page pulls those information to display it but when it displays it look like this:
<ol><li>course one</li><li>course 2<br></li></ol><br>
How can I for mat it to shows it without the html elements but still keeps the formatting?
I tried many suggestions but no luck at all, strip_tag etc…
Here is the code for the page:
foreach ($db_handle->query("SELECT * from assignments WHERE courseID='$courseID' AND weeknum='$weekcount' ORDER BY duedayfactor ASC") as $row){
$baseAssignDate = $startdate + $row['duedayfactor'];
$assignDate = date("l n/d/Y",$baseAssignDate);
if($row['displaydate']!= "nodate"){
echo "<b>". $row['displaydate'] . " " . $assignDate . "</b><br>";}
echo $row['descrip'] . "<br>";
}
echo "</td></tr>";
}
I tried many tags but nothing works, everything I tried strips the formatting and gives me the text only which is not what I am looking for.