PHP code does not work I'm using Drupal 7.
I wrote the following code in a token field, but when I refresh the node page, it doesn't show anything.  

if (arg(0) == 'node') {
  $nid = arg(1);
  $node = node_load($nid);
  $s = $node-&gt;field_name['und']['0']['value'];
  echo $s;
}


Can you advise me what I should do?
Try removing the quotes in ['0'] in the following line.

$s = $node-&gt;field_name['und']['0']['value'];