We can use following code for get $ mark and format money.
setlocale(LC_MONETARY, 'en_US.UTF-8');
$amount = money_format('%(#1n', $amount);
How to get euro symbol from php money_format?
i think this will work
setlocale(LC_MONETARY, 'nl_NL.UTF-8');
$amount = money_format('%(#1n', 20);
echo $amount;
Warning :-
This function has been DEPRECATED as of PHP 7.4.0, and REMOVED as of PHP 8.0.0. Relying on this function is highly discouraged.