Grabbing hidden inputs as a string (Using PHP Simple HTML DOM Parser)

后端 未结 2 1526
不知归路
不知归路 2021-01-05 10:28

So I have a form that has 4 inputs, 2 text, 2 hidden. I\'ve grabbed the two text input values from the name, which are (get_me_two, get_me_three) and I\'ve also grabbed the

2条回答
  •  伪装坚强ぢ
    2021-01-05 10:41

    I don't use the SimpleDom (I always go whole-hog and use DOMDocument), but couldn't you do something like ->find('input[@type=hidden]')?

    If the SimpleDOM doesn't allow that sort of selector, you could simply loop over the ->find('input') results and pick out the hidden ones by comparing the attributes yourself.

提交回复
热议问题