PHP Programs

Please click on 1-2 Ads to keep this website's Study Material FREE and regularly Updated.

Program 10: Write a PHP program that removes the whitespaces from a string.

whitespace.php

<!DOCTYPE html>
<html>
<head>
	<title>PHP Programs TutorialsDuniya.com</title>
</head>
<body>
	<?php
		$string = 'The quick""brown fox';
		echo"<br> original string is: <br> $string<br>";

		$name=str_replace("","",$string);
		echo"String afterr removing whitespaces is: <br>$name<br>"; 
	?>
</body>
</html>



If you have any suggestion or found any error in the above program, then do let us know at [email protected] or just comment below.