preg_replace: remove tags

Soommaalmolve

New Member
I have a lot of option tags. I would like to remove the tags and get only the values.This is the code:\[code\]<?php$result = preg_replace('/<option value=http://stackoverflow.com/"\d+\" >([A-Za-z0-9]+)<\/option>/', '$1', $result);?>\[/code\]I cannot use strip_tags, strip_tags output:\[code\]id="pesq_marca" class="select164" size="1" onchange="exibeModelosSelectpesq_marca(this.value, 'C','','');" >SelecioneAUDIBMWCHEVROLETCITROENFIATFORDGMCHONDAHYUNDAIJEEPKIA MOTORSMERCEDES-BENZMITSUBISHINISSANPEUGEOTRENAULTSUZUKITOYOTAVOLKSWAGENADAMOAGRALEALFA ROMEOASIA MOTORSBRMBUGGYCADILLACCBTCHAMONIXCHANACHERYCHRYSLERDAEWOODAIHATSUDKWDODGEEFFAENGESAENVEMOFERRARIGURGELHAFEIHUMMERINFINITIIVECO-FIATJAGUARJINBEIJPXLADALAND ROVERLEXUSLIFAN MOTORSLINCOLNLOBINIMAHINDRAMASERATIMAZDAMERCURYMINIMIURAMPNEVIO BRENDLERPORSCHEPROTOTIPOPUMASATURNSEATSHELBYSIMCASMARTSSANGYONGSUBARUTROLLERVOLAREVOLVOWAYWILLYS\[/code\]With this code, I get the content of $result and a lot of trash. What's wrong?Thank you.
 
Back
Top