Hey, I am having problems with a simple Keyword Search I am developing. Here is the source(once i get this working, I will make it use user input, rather than a set variable):
[code=php]<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>
<body>
<?php
$keyword[0] = “2”;
$keyword[1] = “candystand”;
$title[1] = “Candystand”;
$link[1] = “http://www.candystand.com/”;
$keyword[2] = “miniclip”;
$title[2] = “Miniclip”;
$link[2] = “http://www.miniclip.com/”;
$Query = “miniclip”;
for($i=1; $i <= $keyword[0]; $i++)
{
if($Query == $keyword[$i])
{
$Found = true;
print(“<a href='”);
print($keyword[i]);
print(“‘>”);
print($title[i]);
print(“</a>n”);
}
}
if(!$Found)
{
print(“Not found!”);
}
?>
</body>
</html>
Here is the page where it is located: [url]http://216.36.173.149/keysearch.php
As you can see, the PHP is generating the link, but it isn’t filling in the ‘href’ field nor the link text? Anyone able to help me here? Thanx in advance,
-Dan