NYCPHP Meetup

NYPHP.org

[nycphp-talk] EREG Question

Pete Czech - New Possibilities Group, LLC pete at npgroup.net
Wed Feb 5 10:41:16 EST 2003


What I think I need to do is make the expression do this, but I'm pretty bad
with Reg Expressions...

if ^ or , occur before the number and , or ? occur after - then replace -
since the numbers come in 1,2,3,4 form.  Anyone know how I can create an
expression that does that???  Thanks for the help!

PJC

----- Original Message -----
From: "Chris Shiflett" <shiflett at php.net>
To: "NYPHP Talk" <talk at nyphp.org>
Sent: Wednesday, February 05, 2003 10:34 AM
Subject: Re: [nycphp-talk] EREG Question


> --- "Pete Czech - New Possibilities Group, LLC"
> >    foreach($number as $n) {
>
> Add an echo statement right here that displays the current
> value of $n. I think you will find that your problem comes
> sooner than you think.
>
> >     if ($n == $a) {
> >      $content = ereg_replace("$a", "<b>$a</b>",
> > $content);  //<------ PROBLEM AREA!!!
> >      $correct_amount++;
> >     }
> >    }
>
> Chris
>
>
> --- Unsubscribe at http://nyphp.org/list/ ---
>
>
>




More information about the talk mailing list