Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php find first occurrence in string

#You can use the strpos() function 

$cheese = "cheese";

strpos($cheese, 'h');

#Output: 1
 
PREVIOUS NEXT
Tagged: #php #find #occurrence #string
ADD COMMENT
Topic
Name
2+5 =