Quoting variable?

Can someone please guide me in the right direction. How do i quote this the right way?

$data = ‘<a href=“#” onclick="loadcontent(‘content’,’.$tmp->url.‘)">’.$image.$tmp->name.‘</a>’;

Thx

The output should look like this
<a href=“#” onclick=“loadcontent(‘content’,‘http://localhost/giw/)’”>Linktext</a>