I am running into a scenario that I am not sure what the best approach is or if there is a solution to what I am facing. I created a simple database table to house job postings. There is a table column called job requirements. The text that goes with this column should be in list format. Is there anyway, whether it is on the database end or via php, to get the data to populate as a list without having to code it into the database using <li></li>
or without having to have numerous columns for different list points?
The data in the database is in text format not with breaks where new bullets should start.
I am outputting it with the echo '<ul class="jobRequirementList"><li>'. $job_requirements .'</li></ul>';
and getting the data with a foreach loop.
Does anyone see what I could do?
My php code:
foreach ($career_rows as $career_row) {
$category = $career_row['category'];
$job_title = $career_row['job_title'];
$job_description = $career_row['job_description'];
$job_requirements = $career_row['job_requirements'];
$job_status = $career_row['active'];
$AtLeastOneCareer = true;
echo '<div class="posting">';
echo '<div class="postingInner">';
echo '<span class="postingCategory hGc">'. $category .'</span>';
echo '<h3 class="postingTitle">'. $job_title .'</h3>';
echo '<p class="postingDescription dGsmall">'. $job_description .'</p>';
echo '<ul class="jobRequirementList"><li>'. $job_requirements .'</li></ul>';
echo '</div>';
echo '</div>';
}