[PHP] Variable names

2002-04-02 Thread kodrik
If I have a variable, how do I extract the name of the variable. In principle: $varname=somefunction($myvar); The value of $varname is then "myvar" How do I do it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Variable Appended To The End of a URL Is Not Working in SQL Query

2002-04-02 Thread Rick Emery
:48 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Variable Appended To The End of a URL Is Not Working in SQL Query Hmm, run it manually? I'm a newbie, so, could you explain how I'd do that? =) "Jason Murray" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">

Re: [PHP] Variable Appended To The End of a URL Is Not Working in SQL Query

2002-04-01 Thread Dr. Shim
ongren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com - Original Message - From: "Dr. Shim" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 01, 2002 10:41 PM Subject: [PHP] Variable Appended To The End of a URL Is Not Wo

Re: [PHP] Variable Appended To The End of a URL Is Not Working inSQL Query

2002-04-01 Thread Miguel Cruz
On Mon, 1 Apr 2002, Dr. Shim wrote: > I have a variable which is appeneded to the end of a URL, like > > http://www.your_web_site.com/your_page/?your_variable=your_value > > This would return "your_value"; > > echo $your_variable; > > But this wouldn't work, and returns an error > > $sql = "S

Re: [PHP] Variable Appended To The End of a URL Is Not Working in SQL Query

2002-04-01 Thread Tyler Longren
odbc_close($db); ?> Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com - Original Message - From: "Dr. Shim" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 01, 2002 10:41 PM Subject: [PHP] Variable Appended To The End of a

Re: [PHP] Variable Appended To The End of a URL Is Not Working in SQL Query

2002-04-01 Thread Dr. Shim
Maybe you should echo out your SQL and run it manually to see what's going on. J -- Jason Murray [EMAIL PROTECTED] Web Developer, Melbourne IT "Work now, freak later!" > -Original Message- > From: Dr. Shim [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 02,

RE: [PHP] Variable Appended To The End of a URL Is Not Working in SQL Query

2002-04-01 Thread Jason Murray
Message- > From: Dr. Shim [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 02, 2002 2:41 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Variable Appended To The End of a URL Is Not Working in > SQL Query > > > I have a variable which is appeneded to the end of a URL, l

[PHP] Variable Appended To The End of a URL Is Not Working in SQL Query

2002-04-01 Thread Dr. Shim
I have a variable which is appeneded to the end of a URL, like http://www.your_web_site.com/your_page/?your_variable=your_value This would return "your_value"; echo $your_variable; But this wouldn't work, and returns an error $sql = "SELECT * FROM fldField WHERE IDField = " . $id; What coul

RE: [PHP] Variable problem

2002-03-22 Thread Chris
On 22 Mar 2002 at 17:27, Rick Emery wrote: > ${varable}ABC in quotes you can help php with {$(varabl)}ABC > > > -Original Message- > From: Leif K-Brooks [mailto:[EMAIL PROTECTED]] > Sent: Friday, March 22, 2002 5:21 PM > To: Rick Emery > Subject: Re

RE: [PHP] Variable problem

2002-03-22 Thread Rick Emery
${varable}ABC -Original Message- From: Leif K-Brooks [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 5:21 PM To: Rick Emery Subject: Re: [PHP] Variable problem on 3/22/02 6:18 PM, Rick Emery at [EMAIL PROTECTED] wrote: show your code -Original Message- From

RE: [PHP] Variable problem

2002-03-22 Thread Rick Emery
show your code -Original Message- From: Leif K-Brooks [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 5:18 PM To: [EMAIL PROTECTED] Subject: [PHP] Variable problem I have a variable name in a print <<< END and then some text after it. The thing is, php thinks that th

[PHP] Variable problem

2002-03-22 Thread Leif K-Brooks
I have a variable name in a print <<< END and then some text after it. The thing is, php thinks that the text is part of the variable name, which makes the variable, and the text after it, not show up. But, if I put a space, it makes my html not work right. Any ideas? -- PHP General Mailing

Re: [PHP] variable test

2002-03-21 Thread Andrey Hristov
> > if($x) >echo $x; if $x is not defined you will get a warning but that depends on error settings in php.ini. This construction checks whether $x is defined or $x is true. > > if(!empty($x)) >echo $x; $x must be defined. > > -- > PHP General Mailing List (http://www.php.net/) > T

[PHP] variable test

2002-03-21 Thread atu
Hi, I'm asking me, what is the difference of the two "ifs". if($x) echo $x; if(!empty($x)) echo $x; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Variable Variables and Mulitdimensional Arrays

2002-03-15 Thread Charlie Killian
Hi. I want to be able to access a key in a multidimensional array at some depth "n" without knowing before runtime what the keys are. I thought this might be possible using variable variables. Here's some sample code using variable variables and multidimensional arrays: $y = 'a'; $z = 'b'; $t = '

Re: [PHP] variable scope

2002-03-12 Thread David Johansen
Something most have just been wigging out or something because I can't get it to do it again. Maybe I just did something wrong, but it seems to be working now. Thanks for the help though, Dave "Lars Torben Wilson" <[EMAIL PROTECTED]> wrote in message 1015973063.2146.82.camel@ali">news:1015973063.

Re: [PHP] variable scope

2002-03-12 Thread Lars Torben Wilson
On Tue, 2002-03-12 at 14:38, David Johansen wrote: > I have a little chunk of code that checks to see if a variable exists and if > not then it sets it. It goes like this: > > if (empty($page)) > { >$page = "login"; > } > > I then end that part of the php script after doing what I need to. T

[PHP] variable scope

2002-03-12 Thread David Johansen
I have a little chunk of code that checks to see if a variable exists and if not then it sets it. It goes like this: if (empty($page)) { $page = "login"; } I then end that part of the php script after doing what I need to. Then I start up again on the same html page and I assumed that $page h

[PHP] Variable problem with a function calling a ext. librairy

2002-02-21 Thread Marc Andre Paquin
Hello, I created a librairy with configuration setting: background color, font size, customer's name, etc. Like this: (lib_config.inc) $bgcolor = "#ff"; $co = "ABC enterprise"; A second file is building html page headders: (lib_intra.inc) function title($name_section,$name_page){ print "\

Re: [PHP] how can i pass a javascript variable into a PHP variable?

2002-02-11 Thread val petruchek
You can add hidden field in form and before posting set it value to js variable value that can be easily used by PHP script Valentin Petruchek (aki Zliy Pes) *** Cut the beginning *** http://zliypes.com.ua mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscr

[PHP] how can i pass a javascript variable into a PHP variable?

2002-02-11 Thread Simon De Deyne
Hi, does anyone has an idea and example how to get the value of a js variable into a PHP variable, preferably working with sessionvariables or a hiddenform? thank you! Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Variable problem

2002-02-04 Thread Randy Johnson
nt: Friday, January 18, 2002 2:26 PM Subject: RE: [PHP] Variable problem > Use an array !?, I mean : > > $result[$i] = "test"; > > > How do I combine the following so it is treated as one variable > > > > $i=10 > > > > $result$i="tes

Re: [PHP] variable function call (Re: [PHP] unset a function?)

2002-01-31 Thread Bas Jobsen
Hello, > $func = "make_" . $wat; > $temp = $$func($this); I think one $. $func = "make_" . $wat; $temp = $func($this); will work Bas Op donderdag 31 januari 2002 12:17, schreef u: > Hoi Bas, > > $func = "make_" . $wat; > > $temp = $$func($this); > > bvr. > > On Thu, 31 Jan 2002 11:55:12 +0100

Re: [PHP] variable function call (Re: [PHP] unset a function?)

2002-01-31 Thread Lars Torben Wilson
On Thu, 2002-01-31 at 02:55, Bas Jobsen wrote: > Hello, > > > Thanks all. I will rename the second function. > > Now if have: > > if($wat=="naam")$temp=make_naam($this); > else if($wat=="anderenaam")$temp=make_anderenaam($this); > //etc.. > > But i would prefer something like > $temp=make_$wat

Re: [PHP] variable function call (Re: [PHP] unset a function?)

2002-01-31 Thread bvr
Hoi Bas, $func = "make_" . $wat; $temp = $$func($this); bvr. On Thu, 31 Jan 2002 11:55:12 +0100, Bas Jobsen wrote: >Hello, > >> Thanks all. I will rename the second function. > >Now if have: > >if($wat=="naam")$temp=make_naam($this); >else if($wat=="anderenaam")$temp=make_anderenaam($this);

Re: [PHP] variable function call (Re: [PHP] unset a function?)

2002-01-31 Thread Jeff Van Campen
Hey Bas, BV>But i would prefer something like BV>$temp=make_$wat($this); I think you might want something along these lines: eval("make_$wat($this);"); HTH -jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

[PHP] variable function call (Re: [PHP] unset a function?)

2002-01-31 Thread Bas Jobsen
Hello, > Thanks all. I will rename the second function. Now if have: if($wat=="naam")$temp=make_naam($this); else if($wat=="anderenaam")$temp=make_anderenaam($this); //etc.. But i would prefer something like $temp=make_$wat($this); How can i do this? Tnx, Bas -- PHP General Mailing List (

RE: [PHP] Variable referencing/substitution

2002-01-20 Thread Martin Towell
${$vNames[1]} = "new value"; // look at variable-variables in the manual for more info -Original Message- From: Gaylen Fraley [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 20, 2002 3:44 PM To: [EMAIL PROTECTED] Subject: [PHP] Variable referencing/substitution How can th

[PHP] Variable referencing/substitution

2002-01-19 Thread Gaylen Fraley
How can this be done? If I have the name of a variable that is stored in an array, how do I use the stored value to represent the actual variable? Example: $variable = "old value"; $vNames[1] = '$variable'; //literal $variable I want to say $vNames[1] = "new value"; /and have $variable actua

RE: [PHP] Variable Problem

2002-01-19 Thread Philip Olson
> > Well, I'll try the technique you mentioned. > > Your offering is very appreciated. > > Thank you! > > :-] > > > > ps. > > execute me for my english... > > > > --- > > K.Tomono > > > > >

RE: [PHP] Variable Problem

2002-01-18 Thread Steven Maroney
ecute me for my english... > > --- > K.Tomono > > > > -Original Message- > > From: Philip Olson [mailto:[EMAIL PROTECTED]] > > Sent: Saturday, January 19, 2002 2:30 PM > > To: —F–쌤Œá > > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED

Re: [PHP] Variable Problem

2002-01-18 Thread Jason Wong
On Saturday 19 January 2002 14:45, K.Tomono wrote: > Yes, I think too, it's better way to use an array rather than a dynamic > name of the variable. > > I thought that the first question means how to use a dynamic variable. > > By the way, > > > little array propaganda, jic :) Arrays work great

RE: [PHP] Variable Problem

2002-01-18 Thread K.Tomono
¤Œá > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP] Variable Problem > > > > > How do I combine the following so it is treated as one variable. > > It's a good question, but why? Most likely an array will > work best for > this job, arrays are go

Re: [PHP] Variable Problem

2002-01-18 Thread Philip Olson
> How do I combine the following so it is treated as one variable. It's a good question, but why? Most likely an array will work best for this job, arrays are good: http://www.php.net/manual/en/language.types.array.php The man page on foreach is nice too, and has many examples which include

Re: [PHP] Variable Problem

2002-01-18 Thread
Hello. >How do I combine the following so it is treated as one variable > >$i=10 >$result$i="test"; > >I want this to be: > >$result10="test"; > >$i changes so I cannot just put in 10 instead of I. >anybody know how i can do that? > >TIA >Randy How about the below. or Cheers :-) ---

RE: [PHP] Variable problem

2002-01-18 Thread Yoel Benitez Fonseca
Use an array !?, I mean : $result[$i] = "test"; > How do I combine the following so it is treated as one variable > > $i=10 > > $result$i="test"; > > > I want this to be: > > > $result10="test"; > > > $i changes so I cannot just put in 10 instead of I. > > > anybody know how i can do that? -

Re: [PHP] Variable Problem

2002-01-18 Thread val petruchek
Valentin Petruchek (aki Zliy Pes) http://zliypes.com.ua mailto:[EMAIL PROTECTED] - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 19, 2002 2:47 AM Subject: [PHP] Variable Problem > > > How do I combine the followin

[PHP] Variable Problem

2002-01-18 Thread programmer
How do I combine the following so it is treated as one variable $i=10 $result$i="test"; I want this to be: $result10="test"; $i changes so I cannot just put in 10 instead of I. anybody know how i can do that? TIA Randy -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] variable variables

2002-01-17 Thread Alister
On Thu, 17 Jan 2002 11:11:43 -0500, you wrote: >I can not wrap my head around variable variables today, not awake yet or >something. > >For instance I trying something like this: > >while ($i<$loopcounter) { > $temp = "size"; > $valueofsize = $$temp$i; > $i++; >} What about $i

Re: [PHP] variable variables

2002-01-17 Thread [EMAIL PROTECTED]
$valueofsize = ${"size" . $i}; or $var = "size" . $i; $valueofsize = $$var; bvr. On Thu, 17 Jan 2002 11:11:43 -0500, Mike Krisher wrote: >I can not wrap my head around variable variables today, not awake yet or >something. > >For instance I trying something like this: > >while ($i<$loopcount

Re: [PHP] variable variables

2002-01-17 Thread Steve Cayford
On Thursday, January 17, 2002, at 10:11 AM, Mike Krisher wrote: > I can not wrap my head around variable variables today, not awake yet or > something. > > For instance I trying something like this: > > while ($i<$loopcounter) { > $temp = "size"; > $valueofsize = $$temp$i; > try $va

RE: [PHP] variable variables

2002-01-17 Thread scott [gts]
p: http://graphictype.com/scott/pgp.txt > -Original Message- > From: Mike Krisher [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 17, 2002 11:12 AM > To: [EMAIL PROTECTED] > Subject: [PHP] variable variables > > > I can not wrap my head around

[PHP] variable variables

2002-01-17 Thread Mike Krisher
I can not wrap my head around variable variables today, not awake yet or something. For instance I trying something like this: while ($i<$loopcounter) { $temp = "size"; $valueofsize = $$temp$i; $i++; } this doesn't work obviously, $valueofsize ends up with a literal valu

RE: [PHP] variable problem - help!

2002-01-16 Thread Rick Emery
$row[coloumname_${v$ariable}] -Original Message- From: Dani [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 8:36 AM To: [EMAIL PROTECTED] Subject: [PHP] variable problem - help! Importance: High Hi! I 'm trying not to hard code my php coding and I'm trying

Re: [PHP] variable problem - help!

2002-01-16 Thread Dani
Thanks for the reply! I really appriciate it! I'll try it first! regards, Dani Stefan Rusterholz wrote: > > Hi! > > > > I 'm trying not to hard code my php coding and I'm trying to pass a > > variable name into the $row[coloumname_$variable]; > $row["columname_$variable"] should do it. > $row

Re: [PHP] variable problem - help!

2002-01-16 Thread Stefan Rusterholz
> Hi! > > I 'm trying not to hard code my php coding and I'm trying to pass a > variable name into the $row[coloumname_$variable]; $row["columname_$variable"] should do it. $row[constant] is threaten as constant which is normally not the programmers intention (set_error_reporting(0) and you'll see

Re: [PHP] variable problem - help!

2002-01-16 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 16-01-02 at 12:45 * Dani said > Hi! > > I 'm trying not to hard code my php coding and I'm trying to pass a > variable name into the $row[coloumname_$variable]; > > I get an error message for this code. > > I'm just wondering if I could

[PHP] variable problem - help!

2002-01-16 Thread Dani
Hi! I 'm trying not to hard code my php coding and I'm trying to pass a variable name into the $row[coloumname_$variable]; I get an error message for this code. I'm just wondering if I could do this trick using other ways of writing it. Thanks for reviewing! regards, Dani -- PHP General Ma

Re: [PHP] printing php variable into html > print $result; ?

2002-01-03 Thread Philip Olson
A quick rewrite of your code: "; } ?> Your question was how to print the query, in this case you'd just print $sql. That was the point of the above but I got a bit carried away :) Oh, mysql_error() can be very useful for debugging. Regarding the type resource, have a look here: http://ww

Re: [PHP] printing php variable into html > print $result; ?

2002-01-03 Thread charlesk
something like someColumnInTable; echo $row->someOtherColumnInTable; } ?> -- Original Message -- From: "louie miranda" <[EMAIL PROTECTED]> Date: Fri, 4 Jan 2002 04:45:57 +0800 Hi, is it possible to print the sql query? i mean i want to print the output

Re: [PHP] printing php variable into html > print $result; ?

2002-01-03 Thread Mehmet Kamil ERISEN
use $sql = "select .. "; $result = mysql_query($sql); echo $sql; --- louie miranda <[EMAIL PROTECTED]> wrote: > Hi, is it possible to print the sql query? i mean > i want to print the output of the command "SELECT * FROM > members;" > and output it into html, i tried > > print $result; -- i

[PHP] printing php variable into html > print $result; ?

2002-01-03 Thread louie miranda
Hi, is it possible to print the sql query? i mean i want to print the output of the command "SELECT * FROM members;" and output it into html, i tried print $result; -- it gives me different output.. > Resource id #2 ty, louie... # PHP SCRIPT ###

Re: [PHP] Variable Swap?

2001-12-11 Thread Stefan Rusterholz
-- T. +41 1 253 19 55 F. +41 1 253 19 56 W3 www.interaktion.ch -- - Original Message - From: "Bharath Bhushan Lohray" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, December 09, 2001 1:2

[PHP] Variable Swap?

2001-12-11 Thread Bharath Bhushan Lohray
Is there a way of swapping the values of two variables without involving a third variable. something similar to the SWAP(A$,B$) of BASIC I have a big variable(array) and I want to keep my script's memory requirements as low as possible. -Bharath Bhushan Lohray -- PHP General Mailing List (h

Re: [PHP] variable scope / preg_replace_callback question

2001-12-03 Thread Andrey Hristov
function _compile_lang($key){ global $_lang; return $_lang[$key[1]]; } // End _compile_lang HTH Regards, Andrey Hristov - Original Message - From: "Peter Bowyer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 03, 2001 3:45 PM Subject

[PHP] variable scope / preg_replace_callback question

2001-12-03 Thread Peter Bowyer
Hi, Does anyone know of a way of passing other variables to the function being called by preg_replace_callback? For instance, I have the following code: function smarty_compile_lang($tpl_source) { // en.php contains a very large array, $_lang include_once '/home/test/en.php'; g

[PHP] Re: How to get mysql-result into a php variable

2001-11-17 Thread Fred
22@alfa">news:1104_1006021222@alfa... > This is perhaps elementary, but I cannot find solution in the documentation > > I want to transfer to a php variable wheter I find a matching firstname in a group from mysql db > > function lookupFirstname ($fname, $gr, $conection) >

[PHP] How to get mysql-result into a php variable

2001-11-17 Thread Olav Drageset
This is perhaps elementary, but I cannot find solution in the documentation I want to transfer to a php variable wheter I find a matching firstname in a group from mysql db function lookupFirstname ($fname, $gr, $conection) { $sql = "SELECT firstname AS matches "; $sql .= &qu

RE: [PHP] Variable definitions...

2001-11-13 Thread Neil Kimber
e (and its original value) are still accessible. > -Original Message- > From: Chris Hobbs [mailto:[EMAIL PROTECTED]] > Sent: 13 November 2001 17:09 > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP] Variable definitions... > > > Hi Stephan, > > IMHO,

Re: [PHP] Variable definitions...

2001-11-13 Thread Chris Hobbs
Hi Stephan, IMHO, I think the answer requested is the only one that really makes sense - as soon as I read it, _my_ first thought went to scope. If a variable changes values, the other value is no longer usable, and thus there aren't really two variables with the same name in that case. When

[PHP] Variable definitions...

2001-11-13 Thread Stephan
Hello, first of all I didn't exactely know where the right place is to ask this question. Well, my problem is that I just had some exams and am very unhappy on how certain things were rated. There's especially one question and I try to translate it as exact as possible: When is it possible tha

RE: [PHP] variable issue

2001-11-09 Thread Clint Tredway
Friday, November 09, 2001 2:37 PM To: PHP General Subject: [PHP] variable issue Hey everyone, I need some help with a variable issue. How can I delcare a variable and then if a url variable of the same name is present use that value instead? this is what I have: if(!$dte) { $dte=date("j&

RE: [PHP] variable issue

2001-11-09 Thread Matthew Luchak
2001 2:37 PM To: PHP General Subject: [PHP] variable issue Hey everyone, I need some help with a variable issue. How can I delcare a variable and then if a url variable of the same name is present use that value instead? this is what I have: if(!$dte) { $dte=date("j", time()+$ctime); } els

Re: [PHP] variable issue

2001-11-09 Thread R'twick Niceorgaw
replace the if statement if(!$dte) with if (!isset($dte)) - Original Message - From: "Johnson, Kirk" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Friday, November 09, 2001 2:35 PM Subject: RE: [PHP] variable issue > The else cla

RE: [PHP] variable issue

2001-11-09 Thread Johnson, Kirk
The else clause can be removed, since it is not doing anything. What is the error message? Kirk > Hey everyone, I need some help with a variable issue. How can > I delcare a variable and then if a url variable of the same > name is present use that value instead? > > this is what I have: > if

[PHP] variable issue

2001-11-09 Thread Clint Tredway
Hey everyone, I need some help with a variable issue. How can I delcare a variable and then if a url variable of the same name is present use that value instead? this is what I have: if(!$dte) { $dte=date("j", time()+$ctime); } else { $dte=$dte; } and this causing an error in the 'if' expression

Re: [PHP] variable gets lost in function problem again...

2001-10-26 Thread DL Neil
> I have an two dimensional array that is returned from code from an included > file. I'm assigning parts of the array to variables ( $variable = > $array["key"]["value"]; ). This works fine and can be printed until I send > it through a function eg. ( ereg_replace(" ", "_", "$variable"); ). After

[PHP] variable gets lost in function problem again...

2001-10-26 Thread Spunk S. Spunk III
Sorry all but I really need to figure this out. Here's a recap of my problem: I have an two dimensional array that is returned from code from an included file. I'm assigning parts of the array to variables ( $variable = $array["key"]["value"]; ). This works fine and can be printed until I send it

[PHP] variable operators in queries

2001-10-19 Thread Sander Peters
Hello, Is it possible to put variable operators in queries? I tried this (the real variable comes from a form) $Date_Operator =(">="); sql="SELECT * FROM poeple WHERE age $Date_operator 20"; $result_id = mysql_query($sql); It doesn't work like this. I also tried: sql="SELECT * FROM poeple WHE

[PHP] Variable & Configuration Problem

2001-10-18 Thread Patrick Quaedackers
Hello all! I installed PHP 4.0.6 om my server (Winnt server, Apache), and I started testing with it. The problem I have now is this: I want to read the data passed from a form trough a variable. Let's say the form field is called Test. I want to use $Test in my PHP script to read that variable.

Re: [PHP] Variable declaration

2001-09-27 Thread
> > its really a big headache with compilers like c bugging all the way just for >declarations. One remark, btw. Using explicit declarations isn't really more of a headache then _not_ using expl.decl. When you don't use explicit declarations, you'll need to check wether or not a variable is defi

Re: [PHP] Variable declaration

2001-09-27 Thread
From: sagar N Chand <[EMAIL PROTECTED]> Date: Thu, Sep 27, 2001 at 06:01:26PM +0530 Message-ID: <005101c14750$c3189b10$0101a8c0@inferno> Subject: Re: [PHP] Variable declaration > its really a big headache with compilers like c bugging all the way just for >declarations. &g

Re: [PHP] Variable declaration

2001-09-27 Thread sagar N Chand
Cc: [EMAIL PROTECTED] Sent: Thursday, September 27, 2001 2:02 PM Subject: Re: [PHP] Variable declaration > That is the nature of a loosely typed scripting language. I know. > If you prefer a strongly typed compiled language, there are plenty > of those available. I

Re: [PHP] Variable declaration

2001-09-27 Thread
> That is the nature of a loosely typed scripting language. I know. > If you prefer a strongly typed compiled language, there are plenty > of those available. I know to. But those are not as powerful for building websites as PHP. I mean... don't get me wrong here, I think PHP is great (or even

Re: [PHP] Variable declaration

2001-09-27 Thread Rasmus Lerdorf
That is the nature of a loosely typed scripting language. If you prefer a strongly typed compiled language, there are plenty of those available. -Rasmus On Thu, 27 Sep 2001, * R&zE: wrote: > > Like I said, that line does both. It sets the type internally to an > > integer and assigns the valu

Re: [PHP] Variable declaration

2001-09-27 Thread
> Like I said, that line does both. It sets the type internally to an > integer and assigns the value. > > -Rasmus What he (Alberto) is looking for, and what I would prefer to, is to really explicitly declare a variable. There's a difference between a compiler that requires you to declare (inte

Re: [PHP] Variable declaration

2001-09-27 Thread Rasmus Lerdorf
> > What do you mean force declaration? That's what you are doing with this > > line: > > > > $Test = 3; > > Nop! This is just starting to use a variable. Something like: > >integer $Test; > > is declaring a variable. But FAFAIK it's not possible in PHP :( Like I said, that line does both.

Re: [PHP] Variable declaration

2001-09-27 Thread
> What do you mean force declaration? That's what you are doing with this > line: > > $Test = 3; Nop! This is just starting to use a variable. Something like: integer $Test; is declaring a variable. But FAFAIK it's not possible in PHP :( -- * R&zE: -- -- Ren

Re: [PHP] Variable declaration

2001-09-27 Thread Rasmus Lerdorf
On Thu, 27 Sep 2001, it was written: > $Test=3; > echo $Test; > ?> > > And I get no warning about $Test not being declared before (like C > declaration). > > Any1 has an example about forcing variable declaration? What do you mean force declaration? That's what you are doing with this line:

[PHP] Variable declaration

2001-09-27 Thread Alberto
And I get no warning about $Test not being declared before (like C declaration). Any1 has an example about forcing variable declaration? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact

Re: [PHP] Variable variables

2001-09-26 Thread Philip Olson
If I'm reading your snippet correctly, then : $foo = 'bar'; $bar = array('apple','banana'); print ${$foo}[0]; // apple Note the use of {braces}. The last paragraph in the manual describes this a bit : http://www.php.net/manual/en/language.variables.variable.php Although I don't see

[PHP] Variable variables

2001-09-26 Thread Richard Baskett
I can not figure out why this is not working! for ($j=0; $j<$resultNum; $j++) { $newvar = "finalresult".$a; $$newvar[$a][name] = $resultRow[name]; $$newvar[$a][title]= $resultRow[title]; $$newvar[$a][descript] = $resultRow[descript]; $$newvar[$a][countkey] = substr_count("$resul

RE: [PHP] Variable declaration

2001-09-26 Thread Boget, Chris
> I want PHP parser to warn/fail when I try to use a variable > not declared before. Like "Option Explicit" on ASP/VBA. Look here: http://www.php.net/manual/en/function.error-reporting.php Chris

[PHP] Variable declaration

2001-09-26 Thread Alberto
I want PHP parser to warn/fail when I try to use a variable not declared before. Like "Option Explicit" on ASP/VBA. Thnx in advance :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the

Re: [PHP] Variable naming

2001-09-25 Thread Kyle Moore
That was the ticket. Thanks a lot for your help Adam Plocher wrote: > $id = 1; > ${"sql_" . $id} = "hey"; > print $sql_1; -- Kyle Moore UNIX Systems Administrator Trust Company of America -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

RE: [PHP] Variable naming

2001-09-25 Thread Alfredeen, Johan
Read this http://www.php.net/manual/en/language.variables.variable.php Johan www.pongworld.com php tt -Original Message- From: Fábio Migliorini [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 25, 2001 12:28 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Variable naming $id = 1

Re: [PHP] Variable naming

2001-09-25 Thread Fábio Migliorini
uesday, September 25, 2001 1:15 PM Subject: [PHP] Variable naming > I want to use the value of a variable in a variable name. For instance: > > $id = 1; > $sql_$id = "hey"; //set variable $sql_1 to hey > print $sql_1; //should print hey > > I have looked high and low

RE: [PHP] Variable naming

2001-09-25 Thread Adam Plocher
$id = 1; ${"sql_" . $id} = "hey"; print $sql_1; Try that -Original Message- From: Kyle Moore [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 25, 2001 9:15 AM To: [EMAIL PROTECTED] Subject: [PHP] Variable naming I want to use the value of a variable in

RE: [PHP] Variable naming

2001-09-25 Thread Boget, Chris
> I want to use the value of a variable in a variable name. For > instance: > > $id = 1; > $sql_$id = "hey"; //set variable $sql_1 to hey > print $sql_1; //should print hey I *believe* (could be wrong) what you want is this: print ${$sql_1}; Check out variable variables in the dox. Chris

[PHP] Variable naming

2001-09-25 Thread Kyle Moore
I want to use the value of a variable in a variable name. For instance: $id = 1; $sql_$id = "hey"; //set variable $sql_1 to hey print $sql_1; //should print hey I have looked high and low on how to do this. My first idea was eval but I can't seem to get that to work in this instance. Any ideas?

Re: [PHP] Variable conversion problem

2001-09-21 Thread Alexander Deruwe
On Friday 21 September 2001 01:45, Neil Silvester wrote: > Another PHP problem has kept me up all night, scouring through my database > books and trying everything I could think of. I am still new to the MySQL > and PHP field, but never the lass I will not give up. > $cat is a variable that is pas

Re: [PHP] Variable conversion problem

2001-09-20 Thread David Robley
On Fri, 21 Sep 2001 11:15, Neil Silvester wrote: > Another PHP problem has kept me up all night, scouring through my > database books and trying everything I could think of. I am still new > to the MySQL and PHP field, but never the lass I will not give up. > $cat is a variable that is passed to t

[PHP] Variable conversion problem

2001-09-20 Thread Neil Silvester
Another PHP problem has kept me up all night, scouring through my database books and trying everything I could think of. I am still new to the MySQL and PHP field, but never the lass I will not give up. $cat is a variable that is passed to the query from the previous page. The SELECT statement

[PHP] variable arguments wish list

2001-09-04 Thread Chris Lee
I the Sears Christmas catologe is out, Im going to make a christmas wish too. I wish I could just do this function test() { somefunc(func_get_args(), 'one more arg'); } but I cant, I have todo this, ouch function test() { $args = func_get_args(); eval("somefunc( '". implode("', '",

Re: [PHP] Variable Syntax Question

2001-08-31 Thread
From: * R&zE: <[EMAIL PROTECTED]> Date: Fri, Aug 31, 2001 at 04:36:36PM +0200 Message-ID: <[EMAIL PROTECTED]> Subject: Re: [PHP] Variable Syntax Question Btw... Why not just use an array? and then: foreach ($bob as $myValue) { print ($myValue); } That's

Re: [PHP] Variable Syntax Question

2001-08-31 Thread
From: Ninety-Nine Ways To Die <[EMAIL PROTECTED]> Date: Fri, Aug 31, 2001 at 10:28:56AM -0400 Message-ID: <[EMAIL PROTECTED]> Subject: [PHP] Variable Syntax Question > I have a form that reads in a couple variables via: > > > > > > > Now... I want to

[PHP] Variable Syntax Question

2001-08-31 Thread Ninety-Nine Ways To Die
I have a form that reads in a couple variables via: Now... I want to read in those variables in something like the following: for($i=1;$i<4;$i++) { echo "$bob$i"; } BUT that obviously doesn't work, it simple prints 1, so how to I make it echo the value of the variable bob1? -Hass

[PHP] variable variables and eval

2001-08-13 Thread William Bailey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi All, i have come across a strange problem with variable variables. Basicly i'm doing the following and its not working: $section = 'data["SITE"][0]["NAME"][0]'; $pData = 'My Site.'; ${sprintf('$%s', $section)}.=$pData; but it is not working. But

[PHP] variable $PATH_INFO

2001-08-12 Thread lolodev news php
why can i read PATH_INFO server variable with apache under windows server ? with IIS 5 it's OK how can i ? -> Warning: Undefined variable: PATH_INFO in e:\sitephp\php_edit\htdocs\var.php on line 3 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED]

RE: [PHP] Storing Java Script Varable into php variable

2001-07-20 Thread Erik H. Mathy
Hi Mike! Generally the only way to send information from a clientside javascript to a serverside language (in this case PHP) is via a form submit or putting that value into an HREF the user will click. For example: Save your screen settings... (please note: this is all rough

<    2   3   4   5   6   7   8   9   >