preg_match_all problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

preg_match_all problem

Post 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
User avatar
akuji36
Forum Contributor
Posts: 190
Joined: Tue Oct 14, 2008 9:53 am
Location: Hartford, Connecticut

Re: preg_match_all problem

Post by akuji36 »

Post Reply