Link to home
Create AccountLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

option value

<option value="want this value">words</option>
how to get the value out of the option
Avatar of Mazdajai
Mazdajai
Flag of United States of America image

(?:<option value="(.*?)">)

Open in new window

Avatar of rgb192

ASKER

Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 0
$text='<option value="">words</option>';
$pattern = '(?:<option value="(.*?)">)';
preg_match($pattern, $text, $option_matches);
print_r($option_matches);
Not so clear your question ??
SOLUTION
Avatar of Terry Woods
Terry Woods
Flag of New Zealand image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of rgb192

ASKER

these work in finding value

thanks