find position of character in string php
strpos ( string $haystack , mixed $needle [, int $offset = 0 ] ) : int<?php
$mystring = 'abc';
$findme = 'a';
$pos = strpos($mystring, $findme);
// Note our use of ===. Simply == would not work as expected
// because the position of 'a' was the 0th (first) character.
if ($pos === false) {
echo "The string '$findme' was not found in the string '$mystring'";
} else {
echo "The string '$findme' was found in the string '$mystring'";
echo " and exists at position $pos";
}
?>
Also in PHP:
- create random_str laravel
- disable register in laravel
- create database seeder in laravel
- artisan seed
- bu7scador con laravel
- check if key exists with value in array
- DATE fromat H:i j M Y
- check key exists in array in php
- cpt url rewrite
- count length of a string
- current date time in php
- check version of php using composer
- count string length php
- date time formatting php
- convert any uppercase to capitalize in php
- alias migratedb='php artisan migrate'
- convert to timestamp php
- Codeigniter check around count
- How to see if there is a - in a string in php
- create laravel project with composer
- add new column in existing table in laravel migration
- array_unique object
- date F month php
- artisan config cache clear