- trim: documentation ( source)
- preg_replace: documentation ( source)
- strtolower: documentation ( source)
<?php
$name = 'SlimDuct End Fitting 2-3/4" SE/SEN77W';
$str = strtolower(trim(preg_replace('/[^a-zA-Z0-9]+/', '-', $name), '-'));
echo $str. "\n";
?>