Page 1 of 1

preg_match_all problem

Posted: Mon Mar 30, 2009 4:49 am
by itsmani1

Code: Select all

<p><span class="Title">Arcohe Elementary School</span><br />Elementary School<br />County: Sacramento<br />Area: A</p><p><strong>Mark Cornfield</strong>&nbsp;<br />11755 Ivie Rd.<br />Herald, CA  95638<br />&nbsp;(209) 748-2609<br /><a href="http://www.arcohe.lodinet.com" target="_blank">http://www.arcohe.lodinet.com</a><br /><a href="mailto:mcornfield@yahoo.com">mcornfield@yahoo.com</a></p><p>

I want to find phone number and email from above I tied following code to fetch phone number but failed, can anyone help me out?

Code: Select all

$pattern = '/<br \/>(.*)<br \/><a href=/'; //To get school 
preg_match_all($pattern, $myData, $matche1);
Thanks

Re: preg_match_all problem

Posted: Sat Jun 06, 2009 10:29 am
by akuji36