Re: [PHP] Variable variable using constant

2011-10-12 Thread Marc Guay
>   $var = constant('DESKTOP_URL_' . $_SESSION['lang']); Very nice, thank you. Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Variable variable using constant

2011-10-12 Thread Robert Williams
On 10/12/11 11:51, "Marc Guay" wrote: >Let's say that I have 2 constants > >DEFINE('DESKTOP_URL_en', "http://www.website.com/index.php?page=home";); >DEFINE('DESKTOP_URL_fr', >"http://www.website.com/index.php?page=accueil";); > >and I would like to populate the value of an href with them depend

[PHP] Variable variable using constant

2011-10-12 Thread Marc Guay
Hi folks, Let's say that I have 2 constants DEFINE('DESKTOP_URL_en', "http://www.website.com/index.php?page=home";); DEFINE('DESKTOP_URL_fr', "http://www.website.com/index.php?page=accueil";); and I would like to populate the value of an href with them depending on the us

RE: [PHP] Variable variable names...

2001-06-22 Thread Jason Lustig
There's a number of things you can do with variable variables... they're quite powerful, I like 'em a lot. :) Anyway, you can do This would output stuff I think that's what you were asking... You've got to use the { and } around the variables you're using to make teh variable variable.

Re: [PHP] Variable variable names...

2001-06-22 Thread Brian Weisenthal
turns out my subject was right on anyone interested check this page out. http://www.phpbuilder.com/manual/language.variables.variable.php ""Brian Weisenthal"" <[EMAIL PROTECTED]> wrote in message 9h02nm$n7c$[EMAIL PROTECTED]">news:9h02nm$n7c$[EMAIL PROTECTED]... > let say i wanted to see

[PHP] Variable variable names...

2001-06-22 Thread Brian Weisenthal
let say i wanted to see if a variable existed by the name of $myvar2 . how can i make the '2' come from a variable. so i want to say something like $myvar$othervar .(but obviously that wont work) anyone have a clue? i tried using eval but i couldn't get it right -- PHP General Mailing L

RE: [PHP] Variable Variable

2001-05-07 Thread Altunergil, Oktay
http://www.php.net/manual/en/language.variables.variable.php -Original Message- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 4:53 PM To: PHP User Group Subject: [PHP] Variable Variable Hello, I can't find Variable Variable in the php manual. If so

[PHP] Variable Variable

2001-05-07 Thread Brandon Orther
Hello, I can't find Variable Variable in the php manual. If someone has a link to the section in the PHP manual about this please send me a link. Thank you, Brandon Orther -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-m

Re: [PHP] Variable Variable with array

2001-05-07 Thread Gyozo Papp
are you thinking of what this snippet does: $menu = 'menu2'; $i = 2; echo ${$menu}[$i]; - Original Message - From: "Brandon Orther" <[EMAIL PROTECTED]> To: "PHP User Group" <[EMAIL PROTECTED]> Sent: 2001. május 7. 22:16 Subject: [PHP] Variabl

[PHP] Variable Variable with array

2001-05-07 Thread Brandon Orther
Hello, I am trying to use variable variable. with arrays. this may be hard to understand so here is an example: $menu1[0] = "1"; $menu1[1] = "2"; $menu1[2] = "3"; $menu2[0] = "1"; $menu2[1] = "2"; $menu2[2] = "3"; $menu3[0] = "1"; $menu3[1] = "2"; $menu3[2] = "3"; does anyone know t

Re: [PHP] Variable variable

2001-04-18 Thread Plutarck
> The braces aren't required in this case. Yup, your right. I stand corrected. I had forgotten that multiple $s are fine, and that I simply don't use them because I have trouble reading them. The joys of learning ;\ -- Plutarck Should be working on something... ...but forgot what it was. ""

Re: [PHP] Variable variable

2001-04-18 Thread Rasmus Lerdorf
> "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote: > > > 1. If $id is a number I believe PHP will choke b/c I don't believe > numbers > > > can be used as variable names. > > > > Well, generally that is true. If you try to assign a value directly to a > > variable that is a number such as: > > > > $1

Re: [PHP] Variable variable

2001-04-18 Thread Steve Werby
"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote: > > 1. If $id is a number I believe PHP will choke b/c I don't believe numbers > > can be used as variable names. > > Well, generally that is true. If you try to assign a value directly to a > variable that is a number such as: > > $1 = "Hello World";

Re: [PHP] Variable variable

2001-04-18 Thread Rasmus Lerdorf
> 1. If $id is a number I believe PHP will choke b/c I don't believe numbers > can be used as variable names. Well, generally that is true. If you try to assign a value directly to a variable that is a number such as: $1 = "Hello World"; Then it won't work. However, due to a somewhat quirky

Re: [PHP] Variable variable

2001-04-18 Thread Steve Werby
"Plutarck" <[EMAIL PROTECTED]> wrote: > Your problem has little to do with the things mentioned. > > First of all, you are refering to a variable variable incorrectly. Actually, he's not. >You must > use brackets, like this: > > ${$id} The braces aren't required in this case. Of the four examp

Re: [PHP] Variable variable

2001-04-18 Thread Plutarck
Your problem has little to do with the things mentioned. First of all, you are refering to a variable variable incorrectly. You must use brackets, like this: ${$id} If ID has the value "Blue", then the above is the same as: $Blue So in your examble if you had the checkbox with the value "on",

Re: [PHP] Variable variable

2001-04-18 Thread Chris Fry
than reaching the goal you set for > yourself" > - Original Message - > From: Chris Fry <[EMAIL PROTECTED]> > To: Jacky <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Wednesday, April 18, 2001 2:59 AM > Subject: Re: [PHP] Variable varia

Re: [PHP] Variable variable

2001-04-18 Thread Jacky
- From: Chris Fry <[EMAIL PROTECTED]> To: Jacky <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, April 18, 2001 2:59 AM Subject: Re: [PHP] Variable variable > Sorry - thought you only had one! - it's late. > > To Name the checkboxes you need: > whil

Re: [PHP] Variable variable

2001-04-18 Thread Chris Fry
; > - Original Message - > From: Chris Fry <[EMAIL PROTECTED]> > To: Jacky <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Wednesday, April 18, 2001 2:31 AM > Subject: Re: [PHP] Variable variable > > > Jacky, > > > > You do not need

Re: [PHP] Variable variable

2001-04-18 Thread Jacky
OTECTED]> Sent: Wednesday, April 18, 2001 2:31 AM Subject: Re: [PHP] Variable variable > Jacky, > > You do not need the value. The variable $id will either exist (if the user checked it) or not (if the user did not check it). > > Hope this helps. > > Chris > > Jacky wrote:

Re: [PHP] Variable variable

2001-04-18 Thread [EMAIL PROTECTED]
more rewarding than reaching the goal you set for yourself" - Original Message - From: Ulf Wendel <[EMAIL PROTECTED]> To: Jacky <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, April 18, 2001 2:20 AM Subject: Re: [PHP] Variable variable > > > Ja

Re: [PHP] Variable variable

2001-04-18 Thread Chris Fry
Jacky, You do not need the value. The variable $id will either exist (if the user checked it) or not (if the user did not check it). Hope this helps. Chris Jacky wrote: > Hi all > I have a form with check box and name of those checkboxes is usuing variable lke >this, > > > > > and when I

Re: [PHP] Variable variable

2001-04-17 Thread Ulf Wendel
Jacky schrieb: > > > > and when I submit the form to page foo.php4, at that page, I use Variable variable >to call the value of the check box to see if it checked like this > > $quey = "select id from table"; > $result = .. ( assumeing it is done and i got value for $id for all records

[PHP] Variable variable

2001-04-17 Thread Jacky
Hi all I have a form with check box and name of those checkboxes is usuing variable lke this, and when I submit the form to page foo.php4, at that page, I use Variable variable to call the value of the check box to see if it checked like this $quey = "select id from table"; $result = ..