explode
does the job:
$parts = explode('.', $string);
You can also directly fetch parts of the result into variables:
list($part1, $part2) = explode('.', $string);
More Related Contents:
- How to split a string by multiple delimiters in PHP?
- PHP – split String in Key/Value pairs
- How to split a long string without breaking words?
- PHP: Split string into array, like explode with no delimiter
- How do I check if a string contains a specific word?
- Split a comma-delimited string into an array?
- startsWith() and endsWith() functions in PHP
- PHP – concatenate or directly insert variables in string
- Why does PHP consider 0 to be equal to a string?
- Replacing accented characters php
- How to remove accents and turn letters into “plain” ASCII characters? [duplicate]
- How do I remove all specific characters at the end of a string in PHP?
- Dollar ($) sign in password string treated as variable
- Replace last occurrence of a string in a string
- How can I check if a word is contained in another string using PHP?
- Converting a number (1, 2, 3) to a string (one, two, three) in PHP
- Remove a string from the beginning of a string
- What is the most efficient way to count all the occurrences of a specific character in a PHP string?
- How can I remove part of a string in PHP? [closed]
- PHP String Manipulation: Extract hrefs
- How to convert PascalCase to snake_case?
- Get last whole number in a string
- Fastest way of deleting a value in a comma separated list
- Include constant in string without concatenating
- Remove Trailing Slash From String PHP
- Measure string size in Bytes in php
- Explode a paragraph into sentences in PHP
- Remove first 4 characters of a string with PHP
- PHP extract link from tag [duplicate]
- PHP Find all occurrences of a substring in a string