Answers for "find word php"

PHP
6

php find if string contains

if (strpos($string, 'substring') !== false) {
	// do stuff 
}
Posted by: Guest on August-25-2020
0

strpos in php

<?php
// We can search for the character, ignoring anything before the offset
$newstring = 'abcdef abcdef';
$pos = strpos($newstring, 'a', 1); // $pos = 7, not 0
?>
Posted by: Guest on November-18-2020

Browse Popular Code Answers by Language