-1

Please tell me how to get USD Data Rate only from this code?

(.*)/Ui',$data,$matches); $title = $matches[1]; foreach ($title as $value) { echo $value. ""; }

1 Answers1

0

This is the full Code

    <?php

$data = file_get_contents('https://www.bi.go.id/id/statistik/informasi-kurs/transaksi-bi');

preg_match_all('/<td.*>(.*)<\\/td>/Ui',$data,$matches);
$title = $matches[1];


foreach ($title as $value) {
    echo $value. "</br>";
}