Sorry if I am a PHP noob...
I am trying to remove the whitespace from a user's input so that the "tel link" doesn't have any spaces within it.
My code looks like this:
<div class="nt-menu-phone-number">
<?php
if( !empty ($nt_theme_options['menu_style1_number'])) { ?>
<a href="tel:<?php echo esc_html($nt_theme_options['menu_style1_number']); ?>"><?php echo esc_html($nt_theme_options['menu_style1_number']); ?></a>
<?php } ?>
</div>
How do I go about removing the whitespace? I have tried putting the trim() function around it but no luck.
Any helps greatly appreciated, thanks.