ในฟิลด์ของ message จะเก็บข้อความเป็น
This site uses cookies to deliver our services and to show you relevant ads and job listings. By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, CODE 4B5F-01 (PRICE) our Terms of Service. Your use of Stack Overflow’s Products and Services, including the Stack Overflow Network, is subject to these policies and terms.
ส่วน Code PHP
<?php
require_once "connectdb.php";
$sqltb="select * from tabletb where id=1";
$db_query=mysql_query($sqltb);
$resultp=mysql_fetch_array($db_query);
$message=$resultp[message];
$ch=curl_init('$message');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$page = curl_exec($ch);
preg_match('#CODE[^>]*(.+?)(PRICE[^>]*)#is', $page, $matches);
foreach ($matches as &$match) {
$match = $match;
}
// echo '<table>';
echo "<b>$matches[0]</b>";
//echo '</table>';
?>
</body>
</html>
ความต้องการคือดึงค่าที่อยู่ CODE 4B5F-01 (PRICE) มาแสดงครับ ผลลัพท์คือ 4B5F-01
ไม่ทราบว่าต้องแก้ตรงไหนครับรบกวนช่วยทีครับ