xxxxxxxxxx
<?php
// 21. strstr()
$haystack = "Hello, world!";
$needle = "world";
echo strstr($haystack, $needle);
echo "\n";
// Output:
// world!
// 22. strrev()
$str = "Hello, world!";
echo strrev($str);
echo "\n";
// Output:
// !dlrow ,olleH
// 23. str_shuffle()
$str = "Hello, world!";
echo str_shuffle($str);
echo "\n";
// Output:
// (Output will be a random shuffle of "Hello, world!")
// 24. strip_tags()
$str = "<p>Hello, <b>world</b>!</p>";
echo strip_tags($str);
echo "\n";
// Output:
// Hello, world!
// 25. htmlentities()
$str = "<p>Hello, <b>world</b>!</p>";
echo htmlentities($str);
echo "\n";
// Output:
// <p>Hello, <b>world</b>!</p>
?>