Cleaning up a string
I would say that the first one is a bit more readable, while the second one is a bit more extendable. 

Note though that the functions are not actually the same. For example . a . will produce different results.

Also, personally, I would extract the array from the body of the second function to make it actually reusable:

$str = "my string";
$chars = array('.', ',', '-', '/');
$cleaned_str = str_cleaner($str, $array);

function str_cleaner($str, $chars)
{    
    foreach($chars as $char) {
        $str = str_replace($char, '', trim($str));
    }
    return $str;
}


Of course, this is also more complex than it needs to be, as str_replace actually accepts an array:

$chars = array('.', ',', '-', '/');
$cleaned_str = str_replace($chars, "", $str);