conditionally echo in meta box data loop

$val will never == ” here, because $val is holding your field name, not the data. also, use get_the_value to have it returned, the_value will just echo the data out.

foreach ($values as $val) {
    if ($artinfo_mb->get_the_value($val) != ''){
        $artinfo_mb->the_value($val);
        echo '<br />';
    }
} 

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)