Posted by Kimmo Laine on 01/21/06 14:38
"windandwaves" <winandwaves@coldmail.com> kirjoitti
viestissδ:1gnAf.18037$vH5.888781@news.xtra.co.nz...
> Balazs Wellisch wrote:
>>> define("a1", "b");
>>> echo a1
>>> $y = 1;
>>> $x = "a".$y
>>> echo contant($x);
>>>
>>> for the last line I get an error. How can I fix this?
>>
>> Just check your spelling and punctuation!
>>
>> define("a1", "b");
>> echo a1;
>> $y = 1;
>> $x = "a".$y;
>> echo constant($x);
>>
>> It works.
>>
>> Balazs
>
> it was actually just an example. In real life it is not working! It is a
> pretty old version of PHP, could that be it? It does recognise constant
> as a function though. It was all rather weird.
Constant() function is available since php 4.0.4
http://fi.php.net/manual/en/function.constant.php
--
SETI @ Home - Donate your cpu's idle time to science.
Further reading at <http://setiweb.ssl.berkeley.edu/>
Kimmo Laine <antaatulla.sikanautaa@gmail.com.NOSPAM.invalid>
[Back to original message]
|