While you should store the data as one row per image, not as a delimited list within one row, your goal for the current method would be to loop over the array keys and access the corresponding values in the three $pics, $cap1, and $cap2 arrays -
// loop over the array keys (from one array) and access the corresponding values in each array
foreach(array_keys($pics_array) as $key)
{
print "<div class='slide'><div class='image'><a href='#'><img src='slider/$pics_array[$key]' /></a></div>";
print "<span class='caption1'>$cap1_array[$key]</span>";
print "<span class='caption2'>$cap2_array[$key]</span>";
print "</div>";
}