find a word in string php
$myString = "input/name/something";
$strArray = explode('/',$myString);
$name = $strArray[1];
$something = $strArray[2];$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:
- base64_decode image string php
- angular null check in template
- cache flush laravel
- array_key_exists not finding numbers
- composer check current php version
- How to read a entire file in one line PHP script a. file_content() b. fgetc() c. read_file() d. get_file_contents()
- dsiplay array on php
- echo the number if the division is 1 php
- days into date in php
- date( w ) php
- check length text pph
- drupal 8 date formater service
- clearview cache laravel
- create new laravel project terminal
- create migration model and seeder laravel at once
- file upload in php through ajax
- check url parameter if not redirect wordpress
- "Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) +laravel"
- check if a string contains a substring php
- Tto upper php
- count variable lenth in php
- $_SERVER php where link came from
- PHP if contains string
- Best documentation tools for php