How to separate database entries and display them as individual records using PHP?
- by Clark
I used to have database entries separated by ampersands (&), but this was causing certain search issues so I decided to encapsulate my entries on both sides by $ and & symbols like:
$this&
But I am having trouble displaying all the entries of a cell as individual records. Before I used:
$unsplitItems = $row['files'];
$files = explode("@", $unsplitItems);
foreach ($files as $file) {
if(strlen($file)) {
echo "<li>$file</li>";
}
}
Any idea how I can split my records and display all the items in the array as individual entries?