I have part of a PHP application which assess a long string input by the user, and extracts a number which always begins 20 characters into the string the user supplies.
find first occurrence of double quote after 20 chars, substract 19 - that gives you length of desired substring:
$dq = strpos($string,'"',19); //19 is index of 20th char $desired_string = substr($string,19,$dq-19);