I am printing out some variables within a table using a for each loop, I would like to pass one of these variables "car" to a URL. The URL should look as follows;
http://www.google.co.uk/search?q=[VALUE_OF_CARS_HERE]&btnG=Search+Books&tbm=bks&tbo=1&gws_rd=ssl
My for each successfully prints the results and looks as follows;
foreach ($this->books as $book) {
echo '<td>'.$book->id.'</td>';
echo '<td>'.$book->title.'</td>';
}
I have tried the following;
echo '<td>http://www.google.co.uk/search?q='.$book->title.'&btnG=Search+Books&tbm=bks&tbo=1&gws_rd=ssl</td>';
This simply prints out the text but it's not 'clickable';
http://www.google.co.uk/search?q=Cars&btnG=Search+Books&tbm=bks&tbo=1&gws_rd=ssl
Where am I going wrong?
<a href="http://www.google...">Text</a>