I have a text file called database.txt and it contains 3 URLs separated with a " - ".
<?
$dir = $_POST['path123'];
$percorso = file($dir."/database.txt");
while(list(,$value) = each($percorso)){
list($gp1, $gp2, $gp3) = split("[:]", $value);
#declaration trim()
$params["gp1"] = trim($gp1);
$params["gp2"] = trim($gp2);
$params["gp3"] = trim($gp3);
#print results
}
echo '<img src="$gp1" border=0>';
?>
As you can see, path123 is the name of the folder and $percorso is the path of the database.txt. With that code I should load the 3 URLs in 3 different variables (gp1, gp2 and gp3).
My problem is that when I use echo '<img src="$gp1" border=0>' mozilla gives me an error here that says "syntax error, unexpected $end". So I can't show on the screen the 1st URL on my database.txt file. Any help?