2021年3月19日星期五

Fastest and easiest way to explode and find a string between a delimeter

i want to check if there is a match in this string with a string i'mlooking for.

$string='my|string|between|delimeters';  also  $string='my|string';  also  $string='my';  

normaly i will do it in this way

$check=explode('|',$string);  if (in_array("string", $check)) {  echo'goal';  }  

Now i ask myself if there is a better, easier, faster way to to the same job?

https://stackoverflow.com/questions/66718138/fastest-and-easiest-way-to-explode-and-find-a-string-between-a-delimeter March 20, 2021 at 12:05PM

没有评论:

发表评论