Find all occurrences of a substring in a string with PHP
PHP stripos (or mb-stripos) finds the position of the first occurrence of a (case-insensitive) substring in a string. How to find all occurrences? Here is a solution: <?php /** *…
PHP stripos (or mb-stripos) finds the position of the first occurrence of a (case-insensitive) substring in a string. How to find all occurrences? Here is a solution: <?php /** *…
Trying to dump mysql databases (especially after mysql 5.1), it is possible to get the error mysqldump: Got error: 1449: The user specified as a definer ('root'@'%') does not exist…
JSON is a data format (possible the most) suitable for use with javascript, especially on ajax operations. Some characters in strings have to be escaped, otherwise json cannot be parsed and an error will…
Using Facebook LIKE button or other social media share buttons, it is useful to define the URL of the page you want to share. It is not requested (by default),…
You can search for a certain package in a Debian system using dpkg. dpkg --list "package_name" Example Give the command dpkg --list "apache2*" the result looks like: Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend…