Search
 
SCRIPT & CODE EXAMPLE
 

PHP

PHP strrchr — Find the last occurrence of a character in a string

<?php
// get last directory in $PATH
$dir = substr(strrchr($PATH, ":"), 1);

// get everything after last newline
$text = "Line 1
Line 2
Line 3";
$last = substr(strrchr($text, 10), 1 );
?>
Comment

PHP strrpos — Find the position of the last occurrence of a substring in a string

<?php

$pos = strrpos($mystring, "b");
if ($pos === false) { // note: three equal signs
    // not found...
}

?>
Comment

PREVIOUS NEXT
Code Example
Php :: explode last element php 
Php :: php get end date of month 
Php :: php file get content replacing & with &amp; 
Php :: Cannot use object of type stdClass as array 
Php :: php get day diff 
Php :: php code to check if variable is null 
Php :: loop through values of hash php 
Php :: run artisan command from controller 
Php :: rtl file manager laravel 
Php :: file get content using call api in php 
Php :: remove get parameters from url php 
Php :: laravel form submit page expired 
Php :: install symfony in terminal 
Php :: laravel optional route parameter in middle of url 
Php :: laravel sentence word count 
Php :: replace all php 
Php :: get php to send email from form 
Php :: how to increase request timeout in laravel 
Php :: error reporting on php 
Php :: php array continued 
Php :: wordpress write all error in log 
Php :: auto submit button php 
Php :: 500 error php 
Php :: laravel string builder 
Php :: href in laravel view 
Php :: wp_query post by category id 
Php :: Magento 2 -Limit the length of the product name on the front end. 
Php :: php for 
Php :: How to copy all files from one folder to another in PHP? 
Php :: how to print count query in php 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =