<?php $input = "Email <a href='spammer@example.com'>spammer@example.com</a>"; echo strip_tags($input); ?>