Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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

PHP strripos — Find the position of the last occurrence of a case-insensitive substring in a string

<?php
$haystack = 'ababcd';
$needle   = 'aB';

$pos      = strripos($haystack, $needle);

if ($pos === false) {
    echo "Sorry, we did not find ($needle) in ($haystack)";
} else {
    echo "Congratulations!
";
    echo "We found the last ($needle) in ($haystack) at position ($pos)";
}
?>
Comment

PREVIOUS NEXT
Code Example
Php :: customize response body with filters laravel 
Php :: Comment supprimer les avis sur les produits de votre boutique WooCommerce 
Php :: install tinymce php 
Php :: laravel migration unknown column type double requested 
Php :: remove all breadcrumbs php 
Php :: pass yield to vue component laravel 
Php :: Laravel 9.x Target class does not exist error at login application 
Php :: iterate over assets container statamic 
Php :: merge two entity symfony 
Php :: php datetime format 
Php :: sage theme get template 
Php :: forPage return keys on page 2 
Php :: seed specific seeder laravel 
Php :: check if date is older than today php 
Php :: propel find index 
Php :: multiply 
Php :: $this meaning in codeigniter 
Php :: larevel binance api 
Php :: laravel not rollback even has error 
Php :: veue laravel remove #/ 
Php :: lista 
Php :: fetch data from database withour restarting console php 
Php :: php pesos en letras rutina 
Php :: next previous post link 
Php :: php if form fails keep data 
Php :: php mysql submit form 
Php :: get current date epoch php 
Php :: how to insert last id from crud grocery codeigniter 
Php :: laravel change error page to open in vscode 
Php :: gan_sql 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =