mercredi 7 février 2018

PHP check if variable got specific values

I´ve got a button and a in it variable from my CMS:

<a href="mailto:<?php echo $this->field('contact_person_mail#'.$elementCount)->value(); ?>">

Now I want, to check if the variable is a "http"(a webpage) of an email address and if so, add an "mailto:".

Can you guys help my with that?

Aucun commentaire:

Enregistrer un commentaire