Skip to content

Commit

Permalink
Merge pull request AdarshAddee#72 from MarcoSchiavello/main
Browse files Browse the repository at this point in the history
added string reverser
  • Loading branch information
AdarshAddee committed Oct 1, 2022
2 parents e4c82da + b2a56fa commit de510fe
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions PHP/stringReverser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
if(isset($_POST['submit'])) {
$res = strrev($_POST['string']);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>String Reverser</title>
</head>
<body>
<form action="stringReverser.php" method="POST">
<?php if(isset($res)) { ?>
<input type="text" name="string">
<input type="submit" name="submit" value="reverse">
<?php } else { ?>
<p><?php $res ?></p>
<?php } ?>
</form>
</body>
</html>

0 comments on commit de510fe

Please sign in to comment.