Reputation: 3786
How can I detect if a string contains a period . that is in the php variable?
.
Upvotes: 2
Views: 623
Reputation: 169028
if (strpos($variable_to_search, ".") !== FALSE) { // The variable contains a period. }
Upvotes: 10