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: [PHP] Variable problem on 3/22

[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

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/) To

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

[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

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. Then I

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

[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

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

Re: [PHP] Variable problem

2002-02-04 Thread Randy Johnson
: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=test; I want this to be: $result10=test; $i changes so I cannot just put in 10 instead of I

[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 function call (Re: [PHP] unset a function?)

2002-01-31 Thread Jeff Van Campen
Hey Bas, BVBut 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: [EMAIL

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); //etc.. But

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($this); How

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, Bas Jobsen

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 this be done

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

[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 unsubscribe,

Re: [PHP] Variable Problem

2002-01-18 Thread val petruchek
?php $i = 10; eval (\$result$i=\test\;); echo $result10; ? 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

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? -- Yoel Benitez

Re: [PHP] Variable Problem

2002-01-18 Thread $BM'Ln8&8c(B
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. ? $i=10; ${"result$i"}="test"; echo

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 K.Tomono
To: —F–쌤Œá 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 good: http://www.php.net/manual/en

RE: [PHP] Variable Problem

2002-01-18 Thread Steven Maroney
-Original Message- From: Philip Olson [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 19, 2002 2:30 PM To: —F–쌤Œá 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

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

RE: [PHP] variable variables

2002-01-17 Thread scott [gts]
PROTECTED]] Sent: Thursday, January 17, 2002 11:12 AM To: [EMAIL PROTECTED] Subject: [PHP] variable variables 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

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 $valueofsize =

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$loopcounter) {

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 = 0; // set

[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

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 do

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

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

2002-01-03 Thread charlesk
something like ? $result = mssql_query($sql); for ($i=0;$imssql_num_rows($result);$i++) { mssql_data_seek($result,$i); $row = mssql_fetch_object($result); echo $row-someColumnInTable; echo $row-someOtherColumnInTable; } ? -- Original Message

[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 ### html

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; -- it gives me

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

2002-01-03 Thread Philip Olson
A quick rewrite of your code: ?php $conn = mysql_connect($host, $user, $pass); if (!$conn) { echo 'Could not connect: '. mysql_error(); exit; } mysql_select_db($dbname); $sql= SELECT * FROM members; $result = mysql_query($sql); if (!$result) { echo 'Could

[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

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:24 PM Subject: [PHP] Variable Swap

[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';

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

[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 .= FROM persons

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

2001-11-17 Thread Fred
222@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) { $sql = SELECT firstname AS matches ; $sql .= FROM persons ; $sql

[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

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

RE: [PHP] Variable definitions...

2001-11-13 Thread Neil Kimber
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, I think the answer requested is the only one

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

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 clause can be removed, since it is not doing

RE: [PHP] variable issue

2001-11-09 Thread Matthew Luchak
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); } else { $dte=$dte

RE: [PHP] variable issue

2001-11-09 Thread Clint Tredway
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); } else { $dte=$dte

[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

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

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

[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

[PHP] Variable declaration

2001-09-27 Thread Alberto
? error_reporting(E_ALL); $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? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: [PHP] Variable declaration

2001-09-27 Thread Rasmus Lerdorf
On Thu, 27 Sep 2001, it was written: ? error_reporting(E_ALL); $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

Re: [PHP] Variable declaration

2001-09-27 Thread * RzE:
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 :( -- * RzE: -- -- Renze

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. It sets the

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, * RzE: wrote: Like I said, that line does both. It sets the type internally to an integer and assigns the value.

Re: [PHP] Variable declaration

2001-09-27 Thread * RzE:
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 * RzE:
Original message 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. its cl

[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 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 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] =

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

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 a variable name. For instance

Re: [PHP] Variable naming

2001-09-25 Thread Fábio Migliorini
$id = 1; $sql_1 = hey; $vname = sql_.$id; echo $$vname; -- Fábio Migliorini http://www.atua.com.br [EMAIL PROTECTED] UIN: 42729458 Linux User: 175409 - Original Message - From: Kyle Moore [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 1:15 PM Subject: [PHP

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

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 passed

[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

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 the

[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(', ',

[PHP] Variable Syntax Question

2001-08-31 Thread Ninety-Nine Ways To Die
I have a form that reads in a couple variables via: input type=textbox name=bob1 input type=textbox name=bob2 input type=textbox name=bob3 input type=textbox name=bob4 Now... I want to read in those variables in something like the following: for($i=1;$i4;$i++) { echo $bob$i; } BUT that

Re: [PHP] Variable Syntax Question

2001-08-31 Thread * RzE:
Original message 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: input type=textbox name=bob1 input type=textbox name=bob2

Re: [PHP] Variable Syntax Question

2001-08-31 Thread * RzE:
Original message From: * RzE: [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? input type=text name=bob[] input type=text name=bob[] input type=text name=bob[] input type

[PHP] variable $PATH_INFO

2001-08-13 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 ? ? print $PATH_INFO ? - 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,

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

[PHP] Storing Java Script Varable into php variable

2001-07-20 Thread Mike Mike
Hello, I look through the php-general list database but could not find the answer. My question is I have some java script I want to store the java script variable into a php variable so I can submit it into a database. Here is the Java sript code. -- function show(){ if (!document.all

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

2001-07-20 Thread Johnson, Kirk
-Original Message- From: Mike Mike [mailto:[EMAIL PROTECTED]] Sent: Friday, July 20, 2001 9:34 AM To: [EMAIL PROTECTED] Subject: [PHP] Storing Java Script Varable into php variable My question is I have some java script I want to store the java script variable into a php variable

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: !-- your javascript functions function show(){ if

[PHP] Variable dump on error

2001-07-19 Thread Randy Miller
Using mod_perl when an error is encountered, I have a customized error screen that is defined in http.conf that is displayed to the user. This is just a customized 500 page that then emails me which page crashed and all of the local variables. I can't seem to find a way to do this in PHP

Re: [PHP] Variable dump on error

2001-07-19 Thread Rasmus Lerdorf
Read http://php.net/set_error_handler and http://php.net/trigger_error Pay particular attention to the user notes on the set_error_handler() page. -Rasmus On Thu, 19 Jul 2001, Randy Miller wrote: Using mod_perl when an error is encountered, I have a customized error screen that is defined

[PHP] Variable name into string

2001-07-18 Thread Maxim Volkov
. Consider the following class method reconstraction : ?php $variable = array(); # I CAN NOT do variable variables thing here like function ($$variable) { if ($variable = Text) { $result = input type=\text\ ; foreach ($$variable as $prop=$value) { $result .= $prop=\$value

Re: [PHP] variable

2001-07-18 Thread chris schneck
$foo = foo definition; - Original Message - From: Jeremy Morano [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 1:55 PM Subject: [PHP] variable hi is there any way I can pass a variable without using require() or include()? -- PHP General Mailing List (http

Re: [PHP] Variable name declarations?

2001-07-15 Thread teo
Hi Kent! On Sat, 14 Jul 2001, Kent Sandvik wrote: function sum_array( $input_array ) { var $index; var $sum = 0; for( $index = 0; $index count( $input_array ); $index++ ) $sum += $input_array[ $index ]; return $sum; } The array variable issue has

RE: [PHP] Variable name declarations?

2001-07-14 Thread Kent Sandvik
function sum_array( $input_array ) { var $index; var $sum = 0; for( $index = 0; $index count( $input_array ); $index++ ) $sum += $input_array[ $index ]; return $sum; } The array variable issue has indeed bitten me a couple of times, so now all my arrays are

[PHP] Variable name declarations?

2001-07-13 Thread Matthew Aznoe
I have to agree that strong typing is not a good fit with PHP. It really limits the flexibility of the language that is, at least to me, one it its strongest appeals. Often, strong typing can be overly restrictive, and free typing, when combined with good comments and documentation which

Re: [PHP] Variable name declarations?

2001-07-13 Thread Zak Greant
Hi Matthew, Set your error_reporting level to E_ALL. The parser will then report the use of undeclared variables. --zak - Original Message - From: Matthew Aznoe [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Sent: Friday, July 13, 2001 2:22 PM Subject: [PHP] Variable name declarations

RE: [PHP] Variable name declarations?

2001-07-13 Thread scott [gts]
-Original Message- From: Matthew Aznoe [mailto:[EMAIL PROTECTED]] Subject: [PHP] Variable name declarations? However, I do have one complaint about PHP that seems to have a tendency to bite me far too often, and that is the lack of variable declaration. While I do not think

Re: [PHP] Variable name declarations?

2001-07-13 Thread Rasmus Lerdorf
Does anyone else have any thoughts on this? error_reporting = E_ALL in your php.ini file and PHP will warn you whenever you use an unitialized variable. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

[PHP] Variable Next To Variable?

2001-07-11 Thread Jeff Oien
Sorry if this has been brought up 100 times. I want to do this: $y = 1; while ($y = $Number_Children) { if (!$C_Last_Name$y) { error stuff; $y++; } } The form submitting information to this code has field name like C_Last_Name1 C_Last_Name2

RE: [PHP] Variable Next To Variable?

2001-07-11 Thread Boget, Chris
if (!$C_Last_Name$y) { The form submitting information to this code has field name like C_Last_Name1 C_Last_Name2 depending on how many Children are signing up for something. So I need $y to represent the number. You want this: if (!{$C_Last_Name}{$y}) { The {} surrounding the

RE: [PHP] Variable Next To Variable?

2001-07-11 Thread scott [gts]
--) { if (! $Children_Last[$i]) { // code } } -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Subject: [PHP] Variable Next To Variable? Sorry if this has been brought up 100 times. I want to do this: $y = 1; while ($y = $Number_Children

Re: [PHP] Variable Next To Variable?

2001-07-11 Thread Francis Fillion
You could use an array: like input type=text name=C_Last_Name[1] Way better this way and you oculd do: $y=1; while($ycount($C_Last_Name)){ if(!$C_Last_Name[$y]){ error stuff; y++; } } Jeff Oien wrote:

RE: [PHP] Variable Next To Variable?

2001-07-11 Thread Jeff Oien
I like this idea but it's giving me a parse error on this code: if (!{$C_Last_Name}{$y}) I'm looking at the other ideas also. Jeff Oien if (!$C_Last_Name$y) { The form submitting information to this code has field name like C_Last_Name1 C_Last_Name2 depending on how many Children

<    2   3   4   5   6   7   8   9   >