I want to get the id or the name of a field that keeps changing its value.
Example:
I have these fields in my form:
<input type="text" id="94245" name="94245" value="">
<input type="text" id="name" name="name" value="">
<input type="text" id="status" name="status" value="">
And I want to get the ID or the name of the first field, but it keeps changing, like:
<input type="text" id="52644" name="52644" value="">
<input type="text" id="44231" name="44231" value="">
<input type="text" id="94831" name="94831" value="">
The pattern is that is always a 5 number value.
I've tried this, but no success:
preg_match('/(\d)id=\s*([0-9]{5})\s*(\d+)/', $html, $fieldId);