显示具有特定角色的用户的文本

I have a piece of text in a custom page--front.tpl.php file. I would like to wrap this in a php if statement so that it is displayed only to two of my site roles. I have the below but it only displays for the "client" role whereas I would also like to display it for the"consultants" role.

<?php if (in_array('client', $GLOBALS['user']->roles)):?>

Client profile

in_array function should accept multiple search parameters if they are passed as an array. So it should be something like:

<?php if (in_array(array('client','consultants'), $GLOBALS['user']->roles)):?>

But if that's not working (and it should) you can always use or statement:

<?php if (in_array('client', $GLOBALS['user']->roles) || in_array('consultants', $GLOBALS['user']->roles)):?>

Update: it seems that in_array() can't accept an array for first (needle) parameter. Check out this thread on stack overflow:

Checking to see if one array's elements are in another array in PHP

So array_intersect() function should be what you are looking for.