PHP Select options in CCK field I want to create a CCK field with options determined by PHP. On the content admin page,  in the Allowed Values PHP code the example it gave was 

return array(
  value_1 =&gt; label_1,
  value_2 =&gt; label_2
  ...
);

However, I want one of the options to be the user's name, so I used something like: 

global $user;
$name=$user=&gt;$name;
return array( 'main_guy' =&gt; 'No', $name =&gt; 'yes' );


For some reason, it won't accept quotes or dollar signs. If I delete the first two lines, and remove the quotes and dollar signs (return array(main_guy =&gt; No, name =&gt; yes);), it works ok.

Any ideas?
 That would be the same as the standard, non-dynamic list options.
Your PHP is incorrect :(

The second line should read $name = $user-&gt;name;.