配列内のすべてのリンクに file_get_contents が必要です。したがって、検出された最初の p タグの最初の 20 文字すべてに一致する preg_match コードを適用できます。
私のコードは以下です:
$links = array(0 => "http://en.wikipedia.org/wiki/The_Big_Bang_Theory", 1=> "http://en.wikipedia.org/wiki/Fantastic_Four");
print_r($links);
$link = implode(", " , $links);
$html = file_get_contents($link);
preg_match('%(<p[^>]*>.*?</p>)%i', $html, $re);
$res = get_custom_excerpt($re[1]);
echo $res;