What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-02-25 05:20:02
javascript escape html
function escapeHtml(str) { return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;"); } Add solution -
PHP 2022-02-24 15:40:03
php function to convert string to camelcase
public static function camelCase($str, array $noStrip = []) { // non-alpha and non-numeric characters become spaces $str = preg_replace('/[^a-z0-9' . implode("", $noStrip) . ']+/i', ' ', $str); $str = trim($str); ... Add solution -
PHP 2022-02-18 18:45:12
generate jwt token in php
// Create token header as a JSON string $header = json_encode(['typ' => 'JWT', 'alg' => 'HS256']); // Create token payload as a JSON string $payload = json_encode(['user_id' => 123]); // Encode Header to Base64Url String $base64UrlHeader = str_... Add solution -
Javascript 2022-02-15 20:40:11
defer parsing of javascript avada
function defer_parsing_of_js( $url ) { if ( is_user_logged_in() ) return $url; //don't break WP Admin if ( FALSE === strpos( $url, '.js' ) ) return $url; if ( strpos( $url, 'jquery.js' ) ) return $url; return str_replace( ' src', ' defer s... Add solution -
PHP 2022-02-15 13:25:03
load more in laravel
<!DOCTYPE html> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> <head> <meta name="csrf-token" content="{{ csrf_token() }}"> <title>Laravel dynamic auto load more page ... Add solution
Best helpers
Ranking is empty