What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-10-12 18:04:09
string between two strings
// Gegasoft found this useful and use in helper class function get_string_between($string, $start, $end){ $string = ' ' . $string; $ini = strpos($string, $start); if ($ini == 0) return ''; $ini += strlen($start); $len = strpos($string... Add solution -
PHP 2021-10-09 10:49:07
if part of stringp ph
<?php $mystring = 'abc'; $findme = 'a'; $pos = strpos($mystring, $findme); // Note our use of ===. Simply == would not work as expected /... Add solution -
Javascript 2021-10-06 22:03:05
javascript insert text in textarea at cursor position
function insertAtCaret(areaId, text) { var txtarea = document.getElementById(areaId); var strPos = 0; var br = ((txtarea.selectionStart || txtarea.selectionStart == '0') ? "ff" : (document.selection ? "ie" : false)); ... Add solution -
TypeScript 2021-10-04 20:33:02
too many redirects wordpress
# update wp-config file define('WP_HOME','http://example.com'); define('WP_SITEURL','http://example.com'); #also add define('FORCE_SSL_ADMIN', true); if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on'; Add solution -
PHP 2021-10-02 01:11:04
php mail merge docx document
<?php include_once('tbszip.php'); $zip = new clsTbsZip(); // Open the first document $zip->Open('doc1.docx'); $content1 = $zip->FileRead('word/document.xml'); $zip->Close(); // Extract the content of the first document $p = strpos($content... Add solution