PHP- correct use of quotation marks inside each other

39 Views Asked by At

PHP - The correct way to use single && double quotation marks inside one another. For example:

<?php
   if($_SESSION['id']){  
      echo "<button class='logout' onclick='location.href='?logoff''>Logout</button>";
   }
?>

I am fairly new to programming but it is my understanding that single quotes go inside of the double quotes. Any help would be appreciated - Thank You.

0

There are 0 best solutions below