I don't think you can do this with PHP, as PHP is a server side scripting language... that is too say every thing that PHP does is on the server not on the client aka the end user's computer. What you are talking about sounds like JavaScript but then you said no js because you vary your list...
the compromise:
why not generate several different js files and use a switch statement in PHP to dertemine which js file to load based on whatever permissions the user has
OR
you can be very fancy and use PHP to auto-generate your js files ... just make sure to output the correct headers so that your browser knows to read it as a js file and not a php file