check if a string contains another string php
$myString = 'Hello Bob how are you?';
if (strpos($myString, 'Bob') !== false) {
echo "My string contains Bob";
}if (strpos($string, 'substring') !== false) {
// do stuff
}
Also in PHP:
- creating thumbnail in codeigniter
- day + 1 php
- data format in php
- catch multiple exceptions php 5
- convert date to timestamp in php
- base64 dencode GET variables in PHP
- ADD OR ON SWITCH CASE PHP
- create new project laravel step by step
- buddy group hide notice join
- check object type php
- clear laragon cache
- clear laravel component cache
- code to log errors to web console
- Str::slug laravel 8
- \w\d php
- error_reporting(e_all) in php
- array php missing key
- consol log php
- date php day of wekk
- check if substring in string php
- disable laravel cache
- check if array conttains key
- SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t oo long; max key length is 767 bytes
- Message: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.3.0". You are running 7.2.34-18+ubuntu18.04.1+deb.sury.org+1.