PHP: Showing currency sign if input is a number

Here you go:

According to documentation of get_post_meta , It will return a single value if the third parameter is true. It should be false to return an array.

<?php  
$price = get_post_meta(get_the_ID(),'si-price');
    foreach ($price as $element) { 
        if (is_numeric($element)) { 
            echo '$' . $element; 
            } else { 
            echo $element;
            } 
    } 
?>

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