I am trying to get all values from a large string output where input name = "something";
My curl function returns response in a String format (in fact its a complete html page). Most of the info is useless however inside this string i have information that i would like to get
<input name="queueID" value="4795" type="checkBox" checked>aaaa
<br>
<input name="queueID" value="4799" type="checkBox" checked>bbbb
<br>
<input name="queueID" value="4796" type="checkBox" checked>cccc
<br>
<input name="queueID" value="4794" type="checkBox" checked>dddd
<br>
NOTE: That the number of queueID is dynamic so i can have 2 queues or 10 queues. and also The number on each queue can be different, not necessary in order. the input name is ALWAYS queueID.
As of doing this with REGEX i truly have no idea how to do it, and if someone knows i would appreciate the answer with regex solution.
i have tried doing this in more of a static way such as
$needle = array (' ' ' ' ' ' ' ' );
$pattern = '' . implode('|', array_map('preg_quote', $needle)) . '/i';
foreach($file_list as $file) {
if(preg_match($pattern, $file)) {
}
}
however this will only work if I know how many queues i have and what are the numbers for this queue. Could any one suggest a decent solution for this problem ?
