<?php $str = 'foo o a a'; $str = preg_replace('/\s\s+/g', ' ', $str); // This will be 'foo o' now echo $str;
You have javascript disabled. You will not be able to edit any code.