Is it possible to combine an if/then statement with javascript and php? With php we can "combine" php and html by just ending php such as:

PHP Code:
<?php if ($is_it_true){?>
Code HTML4Strict:
<strong>HTML STUFF</strong>
PHP Code:
<?php ;} ?>
Is there an analogous way to combine javascript and php?

Basically, I have an if/then statement that checks something from the server AND needs to check out something on the page..in other words, something like:

PHP stuff: IF ($user_type !="instructor") && Javascript stuff: (getElementByID("nyroModal)) then back to PHP to do some other stuff.

Thank you,