Q:

php onclick function with "" and '' does not work

i have an question. How can i make this work?
normal html (works):
<button class="btn" onclick="myFunction('pd')">PD</button>

under php does not work!:
Version1: echo '<button class="btn" onclick="myFunction('pd')">PD</button>';
Version2: echo '<button class="btn" onclick="myFunction("pd")">PD</button>';

how did i have to change this? ty guys

A:

1st thx for so many necessary answers!
perfect and short answer was from Mark in the 2nd answer! 
echo '<button class="btn" onclick="myFunction(\'pd\')">PD</button>';

