"; ?> String Processing Application

String Processing Application


"; // As long as there are double spaces inside of the string, kill them // If you wanted to remove tabs and such, you could do it using the same // while loop except that you would search for tabs instead of double // spaces and replace them with a single space while($position = strpos($trimmed_str, " ")) { $trimmed_str = substr_replace($trimmed_str, ' ', $position, 2); } // Now that the string is cleaned up, a simple set of string functions // will count the parameters for you. print "