PHP Programs

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

Program 5: Create a PHP page which accepts string from user. After submission that page displays the reverse of provided string.


<!DOCTYPE html>
	<title>PHP Programs</title>
	<form method="POST" action="">
		enter a string : <input type="Text" name="string1">
		<input type="Submit" name="submit" value="Reverse_String">
	if(isset($_POST["submit"]) == "Reverse_String")
		echo"the string is : $str1 <br/>";

		echo "reversed string is : $str2";

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.