String
String
// String Length
strlen("Hello world!"); // outputs 12
// Word Count
str_word_count("Hello world!"); // outputs 2
// String Reverse
echo strrev("Hello world!"); // outputs !dlrow olleH
// Search for string
echo strpos("Hello world!", "world"); // outputs 6
// string replace
echo str_replace("world", "Dolly", "Hello world!"); // outputs Hello Dolly!
Change Quotes(double/single) To HTML Characters So It Doesn't Explode When Trying To Save To DB
$body = isset($_REQUEST['body']) ? htmlspecialchars($_REQUEST['body'], ENT_QUOTES) : '';