README.md
December 5, 2022 ยท View on GitHub
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 | |
| By | eleet |
| Level | Beginner |
| User Rating | 3.3 (13 globes from 4 users) |
| Compatibility | PHP 4.0 |
| Category | Strings |
| World | PHP |
| 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>