- trim: documentation ( source)
- preg_replace: documentation ( source)
<?php
$test = "Available Color(s): Black, Coral, White.
White halter floor length dress features sheer panels along the bodice and a sexy slit.";
echo trim(preg_replace('/\s\s+/', ' ', $test));
echo trim(preg_replace('/\s+/', ' ', $test));