- rtrim: documentation ( source)
- htmlentities: documentation ( source)
- preg_replace: documentation ( source)
- strtolower: documentation ( source)
<?php
$input = "beëindigén van vreemde #@)(#!@$#$@ links !";
echo
rtrim(
preg_replace('/([^a-z0-9]+)/', '-',
strtolower(
preg_replace("/&([a-z])[a-z]+;/i", "$1",
htmlentities(
$input
)
)
)
)
, '-');