Mahmud Adam Mahmud Adam - 1 year ago 96
PHP Question

Linking to Google Search in href

I am dynamically creating a table, and I'd like to display the title of the books to be links to a Google search of the title. I have looked at many solutions here, but all suggest something like this:

"<td><a href='{$title}'>'$title'</a></td>";

echo "<TR>";
echo "<TD><a href='{$title}'>$title</a></TD>";
echo "</TR>";

But I cannot get this to work since
keeps getting recognized as a comment. Is there a better way to do this?

Answer Source

try this one:

echo "<TR>";
echo "<TD><a href=',ssl#q={$title}'>$title</a></TD>";
echo "</TR>";

it is not perfect way to search, use google search script for best result.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download