What potential security risks are involved in passing email addresses as links in a PHP-generated table?

Passing email addresses as links in a PHP-generated table can expose them to potential security risks such as email harvesting by bots or malicious users. To prevent this, you can obfuscate the email addresses by encoding them before displaying them as links in the table. This can help protect the email addresses from being easily scraped by automated tools.

$email = 'example@example.com';
$encoded_email = base64_encode($email);

echo '<a href="mailto:' . base64_decode($encoded_email) . '">' . $encoded_email . '</a>';