I have struck in the string preg match in php. From the below string i need to match 'index.php?c_id=' and need to get the value of that string. (Ex:index.php?c_id=161377)
$str = '<h3>Resources</h3>
<p><a href="index.php?ci_id=161377">Announcing Upgraded Firmware for N3680 Decoded 2D Imager</a></p>
<p><a href="https://www.honeywellaidc.com/products/oem-scan-engines/2d-imagers/n3680-series">N3680 Product webpage</a></p>
<p><a href="index.php?ci_id=161376">N3680 Product datasheet</a></p>';
preg_match_all('#index.php?([^\s]+)"#', $str, $matches,PREG_OFFSET_CAPTURE);
print_r($matches[1]);
I need the output: 161377 161376
Thanks & regards Kaif