0
여기에 문자열이 있습니다.preg_match_all for <option></option> 일치하는 모든 값을 얻으려면
$string = <option class="abcd" value="1.5">Some Text with White Spaces</option>
나는으로, preg_match_all 또는 유사한 것을 사용하여 일치하는 모든 변수 (1.5
& Some Text with White Spaces
)을 싶어. 나는 오래 전에이 일을하고 있었지만 지금은 기억이 안납니다.
DOM 파서를 사용 해본 적이 있습니까? –
* (관련) * [HTML을 구문 분석하기위한 최선의 방법] (http://stackoverflow.com/questions/3577641/best-methods-to-parse-html/3577662#3577662) – Gordon
@Pekka 그. 어쨌든, 해결책이 있다고 생각합니다 ... – pnm123