- trim: documentation ( source)
- preg_replace: documentation ( source)
- strtolower: documentation ( source)
<?php
$name = 'SlimDuct 2-3/4" Ivory 90° Flat Elbow SK77I';
$str = strtolower(trim(preg_replace('/[^a-zA-Z0-9]+/', '-', $name), '-'));
echo $str. "\n";
?>