note 84718 added to function.define
| From: | jan at webfontein dot nl | Date: | Sun, 27 Jul 2008 12:20:05 +0000 |
| Subject: | note 84718 added to function.define | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-142809@lists.php.net to get a copy of this message | ||
For translating with variables and define, take also a look on the constant() function.
Example :
<?php
define('PAYMENT_IDEAL',"iDEAL Payment ( NL only )");
define('PAYMENT_MASTERCARD',"Mastercard Payment ( international )");
$payparam='MASTERCARD';
echo constant("PAYMENT_$payparam");
// output :
// Mastercard Payment ( international )
?>
----
Server IP: 213.249.64.162
Probable Submitter: 82.92.53.129
----
Manual Page -- http://www.php.net/manual/en/function.define.php
Edit -- https://master.php.net/note/edit/84718
Del: integrated -- https://master.php.net/note/delete/84718/integrated
Del: useless -- https://master.php.net/note/delete/84718/useless
Del: bad code -- https://master.php.net/note/delete/84718/bad+code
Del: spam -- https://master.php.net/note/delete/84718/spam
Del: non-english -- https://master.php.net/note/delete/84718/non-english
Del: in docs -- https://master.php.net/note/delete/84718/in+docs
Del: other reasons-- https://master.php.net/note/delete/84718
Reject -- https://master.php.net/note/reject/84718
Search -- https://master.php.net/manage/user-notes.php