Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

eregi problem 1

Status
Not open for further replies.

Dweezel

Technical User
Feb 12, 2004
428
GB
I'm a beginner, and am probably doing something really basic wrong here:
As a PHP reg. expressions test I set up 'Chris.html' file on my local test server with the following between the <body> tags:
Chris1 :Chris2 : Chris3 : Chris4 etc...

I then wrote a php script containing:

$content=file_get_contents('Chris.html');

eregi('Chris.',$content,$result);

print_r($result);

The problem is that the array '$result' is only receiving one item(Chris1).
If anyone can point out what I'm fouling up here it would be much appreciated.
Thanks.

 
Thanks for the tip DRJ, It works fine now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top