PDA

View Full Version : ereg help plz(tx)



RDWest2005
02 Aug 2005, 06:38 PM
hi guys,
i need some help here
this one has me stumped



$mywords = "^one|two|three|four|five|six$";
$mytest = "three";

if (ereg($mywords , $mytest)) {
$found =
}

echo "$found";


i've tried everyway know to man in my brain to get what ereg matches assigned to $found

the only thing i can get is a value of 1 meaning true
i need the match to assign (three) to found

any ideas here?
tx
RD

LithMaster
04 Aug 2005, 03:09 PM
do you need $found as a boolean value or as the variable $mytest?