phpCopy<?php
$searchString = " ";
$replaceString = "";
$originalString = "This is a programming tutorial";
$outputString = str_replace($searchString, $replaceString, $originalString);
echo("The original string is: $originalString
");
echo("The string without spaces is: $outputString");
?>