Reply to Re: constant

Your name:

Reply:


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]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация