<?php
$areaCodes = array();
$threeDigits = array();
$fourDigits = array();
preg_match_all('/(\d{3})-(\d{3})-(\d{4})/',$content,$matches);
if(count($matches[1])>0)
{
for($i=0; $i<count($matches[1]); $i++)
{
array_push($areaCodes,$matches[1][$i]);
array_push($threeDigits,$matches[2][$i]);
array_push($fourDigits,$matches[3][$i]);
}
}
preg_match_all('/\((\d{3})\)-(\d{3})-(\d{4})/',$content,$matches);
if(count($matches[1])>0)
{
for($i=0; $i<count($matches[1]); $i++)
{
array_push($areaCodes,$matches[1][$i]);
array_push($threeDigits,$matches[2][$i]);
array_push($fourDigits,$matches[3][$i]);
}
}
preg_match_all('/(\d{3}).(\d{3}).(\d{4})/',$content,$matches);
if(count($matches[1])>0)
{
for($i=0; $i<count($matches[1]); $i++)
{
array_push($areaCodes,$matches[1][$i]);
array_push($threeDigits,$matches[2][$i]);
array_push($fourDigits,$matches[3][$i]);
}
}
preg_match_all('\((\d{3})\).(\d{3}).(\d{4})/',$content,$matches);
if(count($matches[1])>0)
{
for($i=0; $i<count($matches[1]); $i++)
{
array_push($areaCodes,$matches[1][$i]);
array_push($threeDigits,$matches[2][$i]);
array_push($fourDigits,$matches[3][$i]);
}
}
print_r($areaCodes);
print_r($threeDigits);
print_r($fourDigits);