So the code below is what I have inside a while() loop
while($nt=mysql_fetch_array($qt)){
which outputs the results from the database, there is about 10 results in the database, all of them are posted. Now, I grab a specific data that changes from another website, but it keeps outputting the same result from $fetchstatus & $fetchbrief, but from the website I am fetching the data from all the information is suppose to be different. Is something preventing the proper data to be fetched for each result from the database?
$htmlfetch = file_get_contents("$url$nt[state]");
preg_match_all(
'/<div id="track-info-status" class="IT-color"><span class="IT sprite-master"> <\/span>(.*?)<\/div>
<div class="IT-color">
(.*?)
<\/div>/s',
$htmlfetch,
$posts, // will contain the blog posts
PREG_SET_ORDER // formats data into an array of posts
);
foreach($posts as $post) {
$fetchstatus = $post[1];
$fetchbrief = $post[2];
}
echo "$fetchstatus - $fetchbrief";
while($nt=mysql_fetch_array($qt)){
which outputs the results from the database, there is about 10 results in the database, all of them are posted. Now, I grab a specific data that changes from another website, but it keeps outputting the same result from $fetchstatus & $fetchbrief, but from the website I am fetching the data from all the information is suppose to be different. Is something preventing the proper data to be fetched for each result from the database?
$htmlfetch = file_get_contents("$url$nt[state]");
preg_match_all(
'/<div id="track-info-status" class="IT-color"><span class="IT sprite-master"> <\/span>(.*?)<\/div>
<div class="IT-color">
(.*?)
<\/div>/s',
$htmlfetch,
$posts, // will contain the blog posts
PREG_SET_ORDER // formats data into an array of posts
);
foreach($posts as $post) {
$fetchstatus = $post[1];
$fetchbrief = $post[2];
}
echo "$fetchstatus - $fetchbrief";
Comment