This can be done in a 1-liner, but since you're new to PHP, lets just make it clear.
First split the string to get an array of the different items.
$itemsStr = "item1, item2, item3"; // input string
$items = explode(", ", $itemsStr); // Gets an array of items
Now traverse the items array and add the string for each item:
foreach($items as $key => $val)
{
$items[$key] = $item . "<img src='$item.png' alt='' /> ";
}
$output = implode(" ", $items);