FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Why Can't I "define" a Value for a Subscript?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Why Can't I "define" a Value for a Subscript? PS [message #175253 is a reply to message #175236] Mon, 29 August 2011 11:43 Go to previous messageGo to previous message
alvaro.NOSPAMTHANX is currently offline  alvaro.NOSPAMTHANX
Messages: 277
Registered: September 2010
Karma:
Senior Member
El 28/08/2011 21:36, eBob.com escribió/wrote:
> I did a simple experiment that I thought might shed some light on this.
> But instead I just increased my confusion.
>
> I tried the following ...
>
> define('SS1SITE',0);
> echo 'ss1site is: '. "SS1SITE\n";
>
> and the output is ...
>
> ss1site is: SS1SITE
>
> My book says that variable substitution happens within double quotes and
> in my limited experience that is true.
>
> Why isn't the variable substitution happening in this case?

Because *constants* are not *variables*.

http://www.php.net/manual/en/language.variables.php
http://www.php.net/manual/en/language.constants.php


>>> Thank you!
>> in inverse order.
> please do not quote
By the way,


--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Deploying PHP 5.3 on CentOS 5.6 with Puppet
Next Topic: Strategic Marketing Summit 2011 (September 24th,Chennai)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 14:40:59 GMT 2024

Total time taken to generate the page: 0.04866 seconds