Everyone really needs to learn regex, though it seems to be eternally relegated to people's todo list.
:(
Anyway, looking at the latest posted code, problem is that the while loop doesn't have a brace block - when it was a single statement (echo) it worked, but now it's multiple statements you need to group them.
PHP code:
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$blah = split(",", $row[images]);
foreach ($blah as $beep)
{
$stringading .= "<img src=\"" . $beep . "\" />";
}
echo "
...
";
}
?>