Site icon Hip-Hop Website Design and Development

How to display html element and php string in the same line?

Hope someone can help me with this.

This is my code:

function swh_woocommerce_store_credit_shortcode() {
    $store_credits = swh_woocommerce_get_store_credits();
    echo "<span style= 'display: inline;'>Remaining Credit:</span>";
    return wc_price($store_credits);
    
}
add_shortcode( 'swh_store_credit_total_value', 'swh_woocommerce_store_credit_shortcode' );

I’m trying to display echo and return in the same line.

i. e. Remaning Credit: $80 and not

Remaining Credit:

$80

Thanks!