What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-11-20 04:32:09
clean function in php
/*** clean FUNCTION IN PHP PHP provides functions that help to clean up strings by removing unwanted whitespace or other characters from the beginning and/or end of the string: trim , rtrim , and ltrim. ***/ Example clean($request->description) /**... Add solution -
PHP 2021-10-25 01:44:14
estimated reading time php
* Calculate the estimated reading time for a given piece of $content depending on words count. * * @param string $content Content to calculate read time for. * @param int $wpm Estimated words per minute of reader. * * @returns int $time Estimated reading ... Add solution -
PHP 2021-10-20 08:39:21
wordpress add widget developer
<?php class My_Widget extends WP_Widget { function __construct() { parent::__construct(  ... Add solution -
PHP 2021-10-14 02:52:03
php strip tags
<?php $text = '<p>Test paragraph.</p><!-- Comment --> <a href="#fragment">Other text</a>'; echo strip_tags($text); //Test paragraph. Other text // Allow <p> and <a> echo strip_tags($text, '<p>&... Add solution -
Other 2021-10-08 20:39:09
Strip off tags in text
<?php $text = '<p>Test paragraph.</p><!-- Comment --> <a href="#fragment">Other text</a>'; echo strip_tags($text); echo "\n"; // Allow <p... Add solution