I want to add in PHP the href of the whats app link and the phone number to complete it with a custom field. I call it $ tel. I can not get it, I get the following error, can you help me? Is it okay?
<?php
$tel = get_field('telefono');
var_dump($tel);
if( $tel ): ?>
<a class="button" href="<?php echo http://api.whatsapp.com/send?phone=$tel;?>">Enviar Whats App</a> // line 153
<?php endif; ?>
Parse error: syntax error, unexpected ':', expecting ',' or ';' in /home/c1300927/public_html/home/wp-content/themes/startit/startit/single.php online 153 (yellow)