4
我需要在使用PHP的HTML文檔中獲取<select>
中的所有<option>
數據。我有此刻的代碼:使用getElementById獲取所有<option> s從<select>使用getElementById
$pageData = $this->Http->get($this->config['url']);
libxml_use_internal_errors(true);
$this->Dom->loadHTML($pageData);
$select = $this->Dom->getElementById('DDteam');
我不知道怎麼了,從這裏開始,讓每一個選項,同時選項標籤中的文本的價值。我無法使用print_r
或類似方法檢查對象。
作品完美,謝謝:) –