PHP Finding the position of a string in another string using strpos

$dot_location = strpos($my_string,".");


$my_string = "12345.";
$pos = strpos($my_string,".");
if ($pos === false) {
  // dot not found
} else {
  // dot found

Other Items in php
Page Views

This page has been viewed 139 times.

Search Code
Search Code by entering your search text above.

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.