Click to show & Click to call php, javascript : i need to create function on php so when user click on Button, will show phone Number After mobile number shown , must be clickable so we can call via mobile

i have tried to implement some codes but it didn't work 

<div class="category-list-title">
             <h5><a href="javascript:void(0)" class="number" data-last="<?php echo get_post_meta($pid, '_carspot_poster_contact', true ); ?>"><span><?php echo esc_html__('Click to View', 'carspot' ); ?></span></a></h5>
          </div>