Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #3000

Re: Why Can't I "define" a Value for a Subscript? PS

From "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid>
Newsgroups comp.lang.php
Subject Re: Why Can't I "define" a Value for a Subscript? PS
Date 2011-08-29 13:43 +0200
Organization http://alvaro.es/
Message-ID <j3fu18$tq9$1@dont-email.me> (permalink)
References <Cvw6q.176718$k33.110045@en-nntp-13.dc1.easynews.com> <5Mw6q.146894$fD6.34307@en-nntp-02.dc1.easynews.com>

Show all headers | View raw


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
--

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Why Can't I "define" a Value for a Subscript? "eBob.com" <eBob.com@totallybogus.com> - 2011-08-28 15:18 -0400
  Re: Why Can't I "define" a Value for a Subscript?  PS "eBob.com" <eBob.com@totallybogus.com> - 2011-08-28 15:36 -0400
    Re: Why Can't I "define" a Value for a Subscript?  PS Norman Peelman <npeelman@cfl.rr.com> - 2011-08-28 15:53 -0400
    Re: Why Can't I "define" a Value for a Subscript?  PS "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2011-08-29 13:43 +0200
  Re: Why Can't I "define" a Value for a Subscript? Denis McMahon <denis.m.f.mcmahon@gmail.com> - 2011-08-28 19:43 +0000
  Re: Why Can't I "define" a Value for a Subscript? Chuck Anderson <cycletourist@invalid.invalid> - 2011-08-28 13:48 -0600
    Re: Why Can't I "define" a Value for a Subscript? "eBob.com" <eBob.com@totallybogus.com> - 2011-08-28 16:57 -0400
      Re: Why Can't I "define" a Value for a Subscript? Richard Damon <news.x.richarddamon@xoxy.net> - 2011-08-28 20:26 -0400
  Re: Why Can't I "define" a Value for a Subscript? "Peter H. Coffin" <hellsop@ninehells.com> - 2011-08-28 15:02 -0500
  Re: Why Can't I "define" a Value for a Subscript? A.Reader <anonymously@example.com> - 2011-08-30 09:55 -0400
    Re: Why Can't I "define" a Value for a Subscript? Jerry Stuckle <jstucklex@attglobal.net> - 2011-08-30 11:09 -0400

csiph-web