RE: [PHP-GENERAL] Re: [PHP3] RE: My eregi() code will not work.
| From: | Ted Knudson | Date: | Fri, 02 Jun 2000 23:06:03 +0000 |
| Subject: | RE: [PHP-GENERAL] Re: [PHP3] RE: My eregi() code will not work. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-931@lists.php.net to get a copy of this message | ||
BTW
PHP Version 3.0.9 is loaded on the server.
Ted Knudson
http://www.automatedcabinets.com
http://www.pulsarusa.com
> -----Original Message-----
> From: Philip Hallstrom [mailto:philip@adhesivemedia.com]
> Sent: Friday, June 02, 2000 4:43 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP-GENERAL] Re: [PHP3] RE: My eregi() code will not work.
>
>
> In article <39381FF5.2303D36B@arlut.utexas.edu>,
> Stephen Hui <shui@arlut.utexas.edu> wrote:
> >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 missed the very original part of this thread, but what are you
> trying to do exactly? Part of the problem might be that you're not
> seeing it displayed since it's just displaying BR's... maybe... on my
> machine using the above (minus the ()'s around the <BR> in ereg) assigns
> $matches[0] to "<br>" and that's it. That's all it should do
> according
> to the manual..
> if you want each of those lines as an element in an array, you should
> look at split/explode...
> hope this helps
> -philip
>
>