php - regex find input value -
the string is:
<input type="hidden" name="billing[address_id]" value="34543" id="billing:address_id" />
how can input value string? tried code:
preg_match('/<input type="hidden" name="billing[address_id]" value="(.*?)" id="billing:address_id" \/>/mis', $html, $results);
your regex correct.. escape [
, ]
@ address_id.
preg_match('/<input type="hidden" name="billing\[address_id\]" value="(.*?)" id="billing:address_id" \/>/mis', $html, $results);
Comments
Post a Comment