Hello dear programmers,

I have a problem with the echoing of a html phrase with an onclick function that executes a javascript function. I want to build a tabpage, for a image gallery.

The echo:

```
 echo "<div class='albumitem'><a class='tablinks' onclick='openAlbum(event, '".$album."')'><h1 class='galleryheader'>".$album."</h1></a><div id='".$album."' class='tabcontent'>";

```

Everything goes well, except the passing of the variable in the onclick function, as you can see here. What actually the HTML looks like:

```
<a class="tablinks" onclick="openAlbum(event, " aubing')'=""><h1 class="galleryheader">Aubing</h1></a>

```

But this onclick event has to look like this:

```
onclick="openAlbum(event, 'Aubing')"

```

Is there a way to actually realise this or do I have to find an other option?
I actually tried switching " with ', didnt go very well....

Thank you for everybody that tries to help