- rtrim: documentation ( source)
- preg_replace: documentation ( source)
- strtolower: documentation ( source)
<?php
$input = "beëindigén van +!#$% ahs !";
echo
rtrim(
preg_replace('/([^a-z0-9]+)/', '-',
strtolower(
iconv('UTF-8', 'ISO-8859-1//TRANSLIT//IGNORE',
$input
)
)
)
, '-');