I've got the following code:
Code: Select all
<?php
$urls_array = file('process.txt');
$last_displayed_url = $_GET['lurl'];
$new_url = $urls_array[(array_search($last_displayed_url, $urls_array)+1)];
foreach ($urls_array as $url) {
echo "<script language=Javascript>";
echo "window.open('$url','test');";
echo "</script>"; }
?>Which brings me to my current problem. Despite the code running fine, I get the following error in Internet Explorer:
Code: Select all
Line: 3
Char: 36
Error: Unterminated String Constant
Code: 0Here's the output from 'view source' in Internet Explorer:
Code: Select all
<script language=Javascript>window.open('http://www.google.co.uk
','test');</script><script language=Javascript>window.open('http://www.google.co.uk
','test');</script><script language=Javascript>window.open('http://www.yahoo.co.uk
','test');</script><script language=Javascript>window.open('http://www.lycos.co.uk','test');</script>- Gordon