php - Get position of last character in a substring -
$big = "new york city"; $small ="or"; $pos = strpos($big, $small); echo $pos;
returns 5 want return 6 position of "r". in advance
$big = "new york city"; $small ="or"; $pos = strpos($big, $small); $pos = $pos + strlen($small) - 1; echo $pos;
Comments
Post a Comment