PHP Programs

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

Program 8: Write a PHP program that checks whether a passed string is palindrome or not.


<!DOCTYPE html>
	<title>PHP Programs</title>
	<form method="GET" action="">
		Enter a string: <input type="Text" name="string1"><br>
		<input type="Submit" name="submit" value="Palindrome">

		if (isset($_GET["submit"]) == "Palindrome")
			echo "the string is : $str1 <br>";

			echo "<br> reversed string is: $str2";

				echo"<br> The string is palindrome";
				echo"<br> The string is not palindrome";

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.