Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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, $end, $ini) - $ini;
    return substr($string, $ini, $len);
}
Comment

PREVIOUS NEXT
Code Example
Php :: codeigniter 4 delete redirect with data 
Php :: Change date format on view - laravel 
Php :: start php cli 
Php :: php get property with ~ 
Php :: run laravel seeder 
Php :: get field object acf 
Php :: laravel localization 
Php :: php socket connect 
Php :: laravel modules 
Php :: php if negative then 0 
Php :: php header not working 
Php :: how to set up alert messages in laravel 8 
Php :: laravel use config 
Php :: php parse query string 
Php :: phpmyadmin drop database 
Php :: how create page 419 in laravel 
Php :: laravel eloquent duplicate record 
Php :: The "AppEntity entity has a repositoryClass set to but this is not a valid class. 
Php :: api symfony 4 @ApiResource 
Php :: laravel sharing record 
Php :: how to save and get checkbox value in database php 
Php :: random string number generator in php codeigniter 
Php :: keep line breaks in textarea 
Php :: orderby not working with groupby laravel 
Php :: acosh php 
Php :: magento 1.9 get all product 
Php :: woocommerce view order details frontend with shortcode 
Php :: add action hook 
Php :: laravel when query 
Php :: laravel collection methods 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =