How to seperate database entries and display them as individual records using PHP?
Posted
by Clark
on Stack Overflow
See other posts from Stack Overflow
or by Clark
Published on 2010-03-24T21:36:05Z
Indexed on
2010/03/24
21:43 UTC
Read the original article
Hit count: 165
php
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 indiivdual 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?
© Stack Overflow or respective owner