Variable with placeholder
The simplest way is using format_string(), you can have 3 kind of replacement token for different sanitisation and formatting.


  @variable: Escaped to HTML using check_plain(). Use this as the default choice for anything displayed on a page on the site.
  
  %variable: Escaped to HTML and formatted using drupal_placeholder(), which makes it display as emphasized text.
  
  !variable: Inserted as is, with no sanitization or formatting. Only use this for text that has already been prepared for HTML display (for example, user-supplied text that has already been run through check_plain() previously, or is expected to contain some limited HTML tags and has already been run through filter_xss() previously).


Example code:

$message = variable_get_value('variable_name');
$message = format_string($message, array('@yourcompany' =&gt; $company_name));