README.md

December 5, 2022 ยท View on GitHub

Pallindrome Checker

Description

Check to see if a string is a palindrome in only 5 lines of code!

More Info

1 string which would be your string. Great to be the form andler for a form.

Submitted On
Byeleet
LevelBeginner
User Rating3.3 (13 globes from 4 users)
CompatibilityPHP 4.0
CategoryStrings
WorldPHP
Archive File

API Declarations

Please put my name eleet-2k2 in your code if you use it.

Source Code

<html>
<head>
<title>Palindrome Checker</title>
</head>
<body>
<?php
$str_reversed = strrev($str);
if ($str == $str_reversed) {
	print("\'$str\' is a palindrome.<br>\n");
} else {
	print("\'$str\' is <b>not</b> a palindrome.<br>\n");
}
?>
</body>
</html>