Question: Using php and js. There is no setInterval in php so I cant do for(i=0.....) How do I set it so that it will loop
Using php and js. There is no setInterval in php so I cant do for(i=0.....) How do I set it so that it will loop through each line every 5 seconds in the div with id of news?
__________________________________________
news.txt:
(line1) ab
(line2) cd
(Line3) kfkrfkfv
...
________________________
$handle = fopen("news.txt", "r");
if ($handle) {
while (($line = fgets($handle)) !== false) {
$cart[] = $line;
}
fclose($handle);
} else {
// error opening the file.
}
?>
News Headline
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
