What are the limitations of using PHP variables in HTML iframes?

When using PHP variables in HTML iframes, the main limitation is that PHP variables cannot be directly accessed within the iframe due to the separation of the PHP server-side code and the client-side HTML code. To overcome this limitation, you can pass the PHP variables to the iframe by setting them as parameters in the iframe's src attribute.

<?php
$variable = "Hello, World!";
?>

<iframe src="iframe.php?variable=<?php echo $variable; ?>"></iframe>