Wordpress PHP Hyperlink help

Hello, I want to include a button in a table that when clicked searches the post title (wordpress) in google. I got this so far:
[php]
$content .= “

<a href=“http://www.google.com/search?q=’ . get_the_title() . ’ " target=”_blank”><img border=“0” alt=“imagelink” src=“wp-content/custom/imageicon.png”>";[/php]

I think I am close but this when the image is clicked searches for (in google):
’ . get_the_title() . ’

So it is taking the ’ . get_the_title() . ’ part literally instead of looking up the title and adding the result… anyone knows how to help ? :slight_smile:

See how that entire line is red? What do you think would make the line you want blue and out of the string?

L O L …

Taking out the text and escaped quotes leaves you this:

$content .= " ";

You can not do $xyz = "adf . some-function . ";   and expect the results of the function to be used in the string.
Something like  $xyz = "adf "  . some function() . "zzzz" ;     will put the results of the function between two strings...
Sponsor our Newsletter | Privacy Policy | Terms of Service