check if a string contains a character php
$a = 'How are you?';
if (strpos($a, 'are') !== false) {
echo 'true';
}// returns true if $needle is a substring of $haystack
function contains($haystack, $needle){
return strpos($haystack, $needle) !== false;
}
Also in PHP:
- array key existence func php
- add random string with data php
- Allowed memory size of 1610612736 bytes exhausted for laravel
- composer install laravel
- check type of result php
- codeigniter base url automatic
- composer require laravel
- change max_execution_time php on script
- display php errors
- composer update
- create new projec in laravel
- cakephp send mail bcc
- add php var to js console log
- base64_encode php
- database seeding in laravel
- all error reporting php
- check string is present or not in php
- array reverce php
- date time from timestamp php
- format DateTime object php
- array value loop in php
- cache issue laravel
- date time format php
- PaymentIntent::create laravel