Strange error updating PHP code in a node
inarray() isn't a PHP function, you're probably looking for in_array() :)

The error you're getting is probably masking the internal Call to undefined function inarray() exception that would be thrown.

EDIT

You also have one too many closing parentheses at the moment, I'd recommend separating out your code to make it cleaner:

&lt;?php

$has_required_role = in_array('approved user', $GLOBALS['user']-&gt;roles);
if (user_is_logged_in() &amp;&amp; $has_required_role):
  // Do something
endif;

?&gt;