tags:

views:

72

answers:

1

In another question someone posted with this reply to my question.

drupal_set_message(t('Some Message @title'), 
array('@title' => $form_state['values']['title'])));

It looks to me that the @title is substituted for the line below. What is this called and what are the advantages and disadvantage of it?

From a quick look I see the @ is used for error suppression but this in a php 4.3 book I have rather than php 5.

(I am running php5.2)

+1  A: 

In Drupal, an @ sign in front of a placeholder is used to signal to Drupal's string parser to run the string attached to the placeholder through check_plain().

More info about string placeholders can be found on the t() API page.

Mark Trapp

related questions