If you assume that the string will be of the form "{number} ft {number} inches", you can use preg_match () :
preg_match('/(\d+)ft(\d+)inches/', $string, $matches);
(\d+)will match a string of one or more digits. The brackets indicate preg_match()to put matching numbers in a variable $matches(the third argument of the function). The function will return 1 if it made a match, from 0 if it is not.
$matches :
Array
(
[0] => 5ft2inches
[1] => 5
[2] => 2
)
- , . , :
$array = array($matches[1], $matches[2]);