think I understand what you mean...
$variable="part1,part2,part3,part4";
$explode=explode(',', $variable);
for ($i=0; $i<count($explode); $i++){
echo $explode[$i];
echo "<br>";
}
Just replace the echo lines with whatever code you want,
hope that helps,
ucbones