Re: [PHP3] RE: My eregi() code will not work.

From: Date: Fri, 02 Jun 2000 20:58:29 +0000
Subject: Re: [PHP3] RE: My eregi() code will not work.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-925@lists.php.net to get a copy of this message
Ted Knudson wrote: > > Stephen > > > You'll need to have parentheses in the regex. Something like this: > > eregi ("(<br>)", $Note, $matches); > > Sorry but it did not work. > This is my code. Cut and past. > > <?php > > $Note = "<br>This is line 1.<br>This is line 2.<br>This is line > 3.<br>"; > > eregi("(<br>)", $Note, $matches); > Print $Note."<br>"; > Print $matches[0]."0<br>"; > Print $matches[1]."1<br>"; > Print $matches[2]."2<br>"; > Print $matches[3]."3<br>"; > > ?> Sorry, I would have tested it, but I don't have access to a PHP-enabled server at this time. I was just going on my gut instinct based on my experience with perl as well as PHP. The only other thing I can think of is not capitalizing "Print", as in print $Note ... ^ lower-case "p" I apologize if I'm not being any help, but as soon as I get off from work, I can go home and do some testing and debugging on your code. What version of PHP are you using? Stephen.

« previous php.general (#925) next »