Using
{$_POST['country']} would be the more accurate way to represent this within a string. This is referred to as complex evaluation.
This would be done for consistency only.
Constants in PHP are not parsed within the context of a string. I personally recommend breaking out of strings completely (or using a formatter which I usually do) instead of doing either of the above. Functions and methods also require complex evaulation.
Here's an example as to how easy it would be to err:
PHP Code:
<?php
define('T', 'C');
$a = array('T' => 'Test', 'C' => 'Cat');
print "This is a string with $a[T] in it.<br />" . PHP_EOL;
print "This is a string with {$a['T']} in it.<br />" . PHP_EOL;
print "This is a string with {$a[T]} in it.<br />" . PHP_EOL;
class Obj
{
private $v;
public function __construct($in)
{
$this->v = $in;
}
public function p()
{
return $this->v;
}
}
$o = new Obj('test');
print "This is a string with {$o->p()} in it.<br />" . PHP_EOL;
print "This is a string with $o->p() in it.<br />" . PHP_EOL;
?>
Results in:
Code:
This is a string with Test in it.<br />
This is a string with Test in it.<br />
This is a string with Cat in it.<br />
This is a string with test in it.<br />
This is a string with () in it.<br />