Re: [PHP] Unexpected behavior of max() function

2012-12-11 Thread Rodrigo Silva dos Santos
A solution to it is, if you can, enter the array itens without the commas, just array(100,110.453351020813,9); Em 11-12-2012 05:05, Andreas Perstinger escreveu: On 11.12.2012 07:48, "Рогулин С.В." wrote: I encountered with unexpected behavior of max() function. When i pass a parameter ['100',

Re: [PHP] Unexpected behavior of max() function

2012-12-10 Thread Andreas Perstinger
On 11.12.2012 07:48, "Рогулин С.В." wrote: I encountered with unexpected behavior of max() function. When i pass a parameter ['100', '110,453351020813', '9'], this function gives answer '9' var_dump( max(array('100', '110,453351020813', '9')) ); // will output: // string(1) "9" As the out

Re: [PHP] Unexpected behavior of max() function

2012-12-10 Thread Алексей Полев
Because it returns alphabetical highest string. You should change your locale or use dot instead of comma: var_dump( max(array('100', '110*.*453351020813', '9')) ); On 11 December 2012 10:48, "Рогулин С.В." wrote: > Hi, dear subscribers. > > I encountered with unexpected behavior of max() fu

[PHP] Unexpected behavior of max() function

2012-12-10 Thread Рогулин С.В.
Hi, dear subscribers. I encountered with unexpected behavior of max() function. When i pass a parameter ['100', '110,453351020813', '9'], this function gives answer '9' var_dump( max(array('100', '110,453351020813', '9')) ); // will output: // string(1) "9" I can`t understand this behaviou

Re: [PHP] Unexpected Notice message

2012-07-05 Thread Matijn Woudt
On Thu, Jul 5, 2012 at 6:54 PM, RGraph.net support wrote: > Hi, > >> that the code should be fixed. > > Or the error reporting turned down... :-) And one day, you decide to write define('QUERY_STRING', "Oh I was so stupid that day"); and since you turned down your error reporting, you will have

Re: [PHP] Unexpected Notice message

2012-07-05 Thread RGraph.net support
Hi, > that the code should be fixed. Or the error reporting turned down... :-) -- Richard, RGraph.net support JavaScript charts for your website using RGraph http://www.rgraph.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Unexpected Notice message

2012-07-05 Thread Andrew Ballard
On Thu, Jul 5, 2012 at 3:10 AM, Arno Kuhl wrote: > -Original Message- > From: Tim Streater [mailto:t...@clothears.org.uk] > Sent: 04 July 2012 06:56 PM > To: Marc Guay; php-general@lists.php.net > Subject: Re: [PHP] Unexpected Notice message > > On 04 Jul 2012 at 16

RE: [PHP] Unexpected Notice message

2012-07-05 Thread Arno Kuhl
-Original Message- From: Tim Streater [mailto:t...@clothears.org.uk] Sent: 04 July 2012 06:56 PM To: Marc Guay; php-general@lists.php.net Subject: Re: [PHP] Unexpected Notice message On 04 Jul 2012 at 16:51, Marc Guay wrote: >> Notice: Use of undefined constant QUERY_STRING - a

Re: [PHP] Unexpected Notice message

2012-07-04 Thread Tim Streater
On 04 Jul 2012 at 16:51, Marc Guay wrote: >> Notice: Use of undefined constant QUERY_STRING - assumed 'QUERY_STRING' in > > I would guess that it's asking you to add quotes around QUERY_STRING...? As in: if (strlen($_SERVER['QUERY_STRING']) > 0) { -- Cheers -- Tim -- PHP General Mailing

Re: [PHP] Unexpected Notice message

2012-07-04 Thread Marc Guay
> Notice: Use of undefined constant QUERY_STRING - assumed 'QUERY_STRING' in I would guess that it's asking you to add quotes around QUERY_STRING...? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Unexpected Notice message

2012-07-04 Thread Arno Kuhl
I'm a bit baffled by a notice message displayed: Notice: Use of undefined constant QUERY_STRING - assumed 'QUERY_STRING' in .. The line in question has if (strlen($_SERVER[QUERY_STRING]) > 0) { .. So I set a breakpoint on the line of the notice. The code executes to the breakpoint, I inspect the

Re: [PHP] Unexpected behaviour from define()

2010-06-25 Thread James Long
Thank you very much! Once I realized the source of the problem, I was dismayed that one could declare a constant and have the interpreter absolutely ignore it without warning. I already had error_reporting to E_ALL in php.ini, so was unaware of what else I could do. Didn't think to look for 'dis

Re: [PHP] Unexpected behaviour from define()

2010-06-25 Thread Richard Quadling
On 24 June 2010 22:41, James Long wrote: outputs ... Notice: Constant LOG_WARNING already defined in - on line 4 LOG_NORMAL 0 LOG_WARNING 5 LOG_ERROR 2 I'm on Win32 PHP 5.3.3-RC1 (cli) (built: Jun 17 2010 22:43:29) -- - Richard Quadling "Standing on the shoulders of some very clever

Re: [PHP] Unexpected behaviour from define()

2010-06-24 Thread Tim Schofield
On 24/06/10 23:08, Ashley Sheridan wrote: On Thu, 2010-06-24 at 23:02 +0100, Tim Schofield wrote: Very strange, as seems to work fine Tim It would, you misspelt LOG_WARNING with a lowercase 'i' ;) Thanks, Ash http://www.ashleysheridan.co.uk Thats what I was trying to illustrate, it

Re: [PHP] Unexpected behaviour from define()

2010-06-24 Thread Ashley Sheridan
On Thu, 2010-06-24 at 23:02 +0100, Tim Schofield wrote: > On 24/06/10 22:41, James Long wrote: > > Perhaps I am missing something basic here. > > > > Why does the LOG_WARNING constant take on a value of 4, when > > it is defined with a value of 1? > > > > Thank you! > > > > Jim > > > > > > $ cat b

Re: [PHP] Unexpected behaviour from define()

2010-06-24 Thread Tim Schofield
On 24/06/10 22:41, James Long wrote: Perhaps I am missing something basic here. Why does the LOG_WARNING constant take on a value of 4, when it is defined with a value of 1? Thank you! Jim $ cat bug.php $ php bug.php LOG_NORMAL 0 LOG_WARNING 4 LOG_ERROR 2 $ Very strange, as seems to w

[PHP] Unexpected behaviour from define()

2010-06-24 Thread James Long
Perhaps I am missing something basic here. Why does the LOG_WARNING constant take on a value of 4, when it is defined with a value of 1? Thank you! Jim $ cat bug.php $ php bug.php LOG_NORMAL 0 LOG_WARNING 4 LOG_ERROR 2 $ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi

Re: [PHP] Unexpected results using ksort on arrays in which the keys are mixed alphanumeric strings.

2009-02-24 Thread Clancy
On Tue, 24 Feb 2009 10:25:25 +0100, joc...@iamjochem.com (Jochem Maas) wrote: >Clancy schreef: >> I have been experimenting using four character alphanumeric keys on an >> array, and when I >> generated a random set of keys, and then used ksort to sort the array, I was >> very >> surprised to fi

Re: [PHP] Unexpected results using ksort on arrays in which the keys are mixed alphanumeric strings.

2009-02-24 Thread Jochem Maas
Clancy schreef: > I have been experimenting using four character alphanumeric keys on an array, > and when I > generated a random set of keys, and then used ksort to sort the array, I was > very > surprised to find that if the key contained any non-numeric character, or if > it started > with ze

[PHP] Unexpected results using ksort on arrays in which the keys are mixed alphanumeric strings.

2009-02-23 Thread Clancy
I have been experimenting using four character alphanumeric keys on an array, and when I generated a random set of keys, and then used ksort to sort the array, I was very surprised to find that if the key contained any non-numeric character, or if it started with zero, the key was sorted as a ba

Re: [PHP] unexpected '@' in preg_replace???

2007-10-30 Thread Zoltán Németh
2007. 10. 30, kedd keltezéssel 10.21-kor Daniel Brown ezt írta: > On 10/30/07, Zoltán Németh <[EMAIL PROTECTED]> wrote: > > 2007. 10. 29, hétfő keltezéssel 11.17-kor Daniel Brown ezt írta: > > > On 10/29/07, Zoltán Németh <[EMAIL PROTECTED]> wrote: > > > > hi list, > > > > > > > > I have this code:

Re: [PHP] unexpected '@' in preg_replace???

2007-10-30 Thread Daniel Brown
On 10/30/07, Zoltán Németh <[EMAIL PROTECTED]> wrote: > 2007. 10. 29, hétfő keltezéssel 11.17-kor Daniel Brown ezt írta: > > On 10/29/07, Zoltán Németh <[EMAIL PROTECTED]> wrote: > > > hi list, > > > > > > I have this code: > > [snip!] > > > Parse error: syntax error, unexpected '@' > > > in /home/

Re: [PHP] unexpected '@' in preg_replace??? - SOLVED

2007-10-30 Thread Zoltán Németh
2007. 10. 29, hétfő keltezéssel 09.17-kor Jim Lucas ezt írta: > Daniel Brown wrote: > > On 10/29/07, Zoltán Németh <[EMAIL PROTECTED]> wrote: > >> hi list, > >> > >> I have this code: > > [snip!] > >> Parse error: syntax error, unexpected '@' > >> in /home/znemeth/public_html/test/pregreplacetest1.

Re: [PHP] unexpected '@' in preg_replace???

2007-10-29 Thread Zoltán Németh
2007. 10. 29, hétfő keltezéssel 11.17-kor Daniel Brown ezt írta: > On 10/29/07, Zoltán Németh <[EMAIL PROTECTED]> wrote: > > hi list, > > > > I have this code: > [snip!] > > Parse error: syntax error, unexpected '@' > > in /home/znemeth/public_html/test/pregreplacetest1.php(94) : regexp code > > on

Re: [PHP] unexpected '@' in preg_replace???

2007-10-29 Thread Jim Lucas
Daniel Brown wrote: On 10/29/07, Zoltán Németh <[EMAIL PROTECTED]> wrote: hi list, I have this code: [snip!] Parse error: syntax error, unexpected '@' in /home/znemeth/public_html/test/pregreplacetest1.php(94) : regexp code on line 1 Fatal error: preg_replace() [function.preg-replace]: Faile

Re: [PHP] unexpected '@' in preg_replace???

2007-10-29 Thread Daniel Brown
On 10/29/07, Zoltán Németh <[EMAIL PROTECTED]> wrote: > hi list, > > I have this code: [snip!] > Parse error: syntax error, unexpected '@' > in /home/znemeth/public_html/test/pregreplacetest1.php(94) : regexp code > on line 1 > > Fatal error: preg_replace() [ href='function.preg-replace'>function.p

[PHP] unexpected '@' in preg_replace???

2007-10-29 Thread Zoltán Németh
hi list, I have this code: ]*>.*?<\/script>/i', //

Re: [PHP] Unexpected values in an associative array

2007-08-07 Thread Ken Tozier
On Aug 8, 2007, at 12:43 AM, Robert Cummings wrote: On Tue, 2007-08-07 at 23:28 -0500, Richard Lynch wrote: On Tue, July 31, 2007 11:06 am, Instruct ICC wrote: What is $value and what is this supposed to do: case'integer':

RE: [PHP] Unexpected values in an associative array

2007-08-07 Thread Robert Cummings
On Tue, 2007-08-07 at 23:28 -0500, Richard Lynch wrote: > On Tue, July 31, 2007 11:06 am, Instruct ICC wrote: > > What is $value and what is this supposed to do: > >>case'integer': > >>

RE: [PHP] Unexpected values in an associative array

2007-08-07 Thread Richard Lynch
On Tue, July 31, 2007 11:06 am, Instruct ICC wrote: > What is $value and what is this supposed to do: >> case'integer': >> $value >> += 0; >> This is a silly hack

Re: [PHP] Unexpected values in an associative array

2007-08-01 Thread Travis D
On 7/31/07, Ken Tozier <[EMAIL PROTECTED]> wrote: > > ... > // set fetch prefs > $this->db->setAttribute(PDO:: FETCH_ASSOC, > true); // also tried 1 > ... > Is that the way to do it? Hmm.. Maybe I sent you in the wrong direction - I can't find any doc

Re: [PHP] Unexpected values in an associative array

2007-07-31 Thread Ken Tozier
On Jul 31, 2007, at 12:06 PM, Instruct ICC wrote: array(6) { ["task_id"]=> int(22) [0]=> string(2) "22" ["container_id"]=> int(3784) [1]=> string(4) "3784" ["name"]=> string(12) "108-6972.XTG" [2]=> string(24) "3130382D363937322E585447" } What is $coersions or $inQuery[

Re: [PHP] Unexpected values in an associative array[Solved]

2007-07-31 Thread Robert Cummings
On Tue, 2007-07-31 at 11:29 -0400, Ken Tozier wrote: > Turns out that objects returned from SQL queries contain two parts > for every field, one with a string key and one with an index key. > Adding an "is_numeric" test on the keys allows you to filter out the > numeric keys if you want to. F

RE: [PHP] Unexpected values in an associative array

2007-07-31 Thread Instruct ICC
From: Ken Tozier <[EMAIL PROTECTED]> Hi I think this is probably just a misunderstanding on my part, but I'm creating associative arrays with string keys from MySQL query results and when I put a value in the array, I get the expected key association along with an index key that has a diffe

Re: [PHP] Unexpected values in an associative array[Solved]

2007-07-31 Thread Ken Tozier
On Jul 31, 2007, at 11:40 AM, Robin Vickery wrote: Or don't get numeric keys in the first place: foreach ($this->db->query($query, PDO::FETCH_ASSOC) as $row) Robin: Bingo! That did the trick. I knew my solution was hokey but I haven't used PDO before this project so wasn't aware of what i

Re: [PHP] Unexpected values in an associative array[Solved]

2007-07-31 Thread Zoltán Németh
2007. 07. 31, kedd keltezéssel 11.29-kor Ken Tozier ezt írta: > Turns out that objects returned from SQL queries contain two parts > for every field, one with a string key and one with an index key. > Adding an "is_numeric" test on the keys allows you to filter out the > numeric keys if you w

Re: [PHP] Unexpected values in an associative array[Solved]

2007-07-31 Thread Robin Vickery
On 31/07/07, Ken Tozier <[EMAIL PROTECTED]> wrote: > Turns out that objects returned from SQL queries contain two parts > for every field, one with a string key and one with an index key. > Adding an "is_numeric" test on the keys allows you to filter out the > numeric keys if you want to. For examp

Re: [PHP] Unexpected values in an associative array

2007-07-31 Thread Jim Lucas
Ken Tozier wrote: foreach ($this->db->query($query) as $row) Well, this is what I was going to say, is that probably query is using *_fetch_array() instead of *_fetch_assoc() or *_fetch_row() -- Jim Lucas "Some men are born to greatness, some achieve greatness, and so

Re: [PHP] Unexpected values in an associative array[Solved]

2007-07-31 Thread Ken Tozier
Turns out that objects returned from SQL queries contain two parts for every field, one with a string key and one with an index key. Adding an "is_numeric" test on the keys allows you to filter out the numeric keys if you want to. For example: foreach ($row as $key => $value) { if (

[PHP] Unexpected values in an associative array

2007-07-31 Thread Ken Tozier
Hi I think this is probably just a misunderstanding on my part, but I'm creating associative arrays with string keys from MySQL query results and when I put a value in the array, I get the expected key association along with an index key that has a different value. For example: If I have

[PHP] Unexpected values in PHP array

2007-07-31 Thread Ken Tozier
Hi I think this is probably just a misunderstanding on my part, but I'm creating associative arrays with string keys from MySQL query results and when I put a value in the array, I get the expected key association along with an index key that has a different value. For example: If I have

Re: [PHP] unexpected T_STRING parse error

2006-10-10 Thread Richard Lynch
On Tue, October 10, 2006 2:18 am, Ilaria De Marinis wrote: > PHP Parse error: parse error, unexpected T_STRING in > /var/www/html/dummy/typo3conf/ext/direct_mail/locallang_tca.xml on > line 1 > > This is line 1 of locallang_tca.xml file > > > I try to switch "short_open_tag" to off in php.ini, bu

Re: [PHP] unexpected T_STRING parse error

2006-10-10 Thread Ilaria De Marinis
It's impossible for me to make this change. xml files are packaged in external modules. I can't manipulate them! Penthexquadium wrote: On Tue, 10 Oct 2006 09:18:18 +0200, Ilaria De Marinis <[EMAIL PROTECTED]> wrote: Hi list, I got a php error in my apache log: PHP Parse error: parse erro

Re: [PHP] unexpected T_STRING parse error

2006-10-10 Thread Penthexquadium
On Tue, 10 Oct 2006 09:18:18 +0200, Ilaria De Marinis <[EMAIL PROTECTED]> wrote: > Hi list, > I got a php error in my apache log: > > PHP Parse error: parse error, unexpected T_STRING in > /var/www/html/dummy/typo3conf/ext/direct_mail/locallang_tca.xml on line 1 > > This is line 1 of locallang_

[PHP] unexpected T_STRING parse error

2006-10-10 Thread Ilaria De Marinis
Hi list, I got a php error in my apache log: PHP Parse error: parse error, unexpected T_STRING in /var/www/html/dummy/typo3conf/ext/direct_mail/locallang_tca.xml on line 1 This is line 1 of locallang_tca.xml file I try to switch "short_open_tag" to off in php.ini, but I got a bad page visu

Re: [PHP] unexpected T_NEW on object property

2006-04-21 Thread Jochem Maas
M. Sokolewicz wrote: Jochem Maas wrote: Paul Barry wrote: .. Then I have another class: this is wrong. you can define the property in the class with a constant or scalar value (i.e. literal string, numeric value or an array) but not a return value of a function or a 'new' object. jus

Re: [PHP] unexpected T_NEW on object property

2006-04-21 Thread M. Sokolewicz
Jochem Maas wrote: Paul Barry wrote: .. Then I have another class: this is wrong. you can define the property in the class with a constant or scalar value (i.e. literal string, numeric value or an array) but not a return value of a function or a 'new' object. just to nag, an array is not

Re: [PHP] unexpected T_NEW on object property

2006-04-21 Thread Jochem Maas
Paul Barry wrote: .. Then I have another class: this is wrong. you can define the property in the class with a constant or scalar value (i.e. literal string, numeric value or an array) but not a return value of a function or a 'new' object. you should initialize the $address property in th

Re: [PHP] unexpected T_NEW on object property

2006-04-21 Thread Richard Lynch
On Fri, April 21, 2006 2:17 pm, Paul Barry wrote: > public $address = new Address(); I believe this is true: At this time, you can only initialize class properties to CONSTANTS. So you could use 'Address' or 42 or NULL or TRUE/FALSE, but not new Address(); Actually, I think an array might a

[PHP] unexpected T_NEW on object property

2006-04-21 Thread Paul Barry
With php5, I'm trying to create an object that has a property that is another object. First I have this class: Then I have another class: Then if I try to use the user object like this: name = 'Paul Barry'; $user->address->city = 'Washington'; ?> name ?> lives in address->city ?> I get th

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] Unexpected T_IF

2005-04-25 Thread The Disguised Jedi
please post the whole file, or a few lines before... On 4/25/05, Mattias Thorslund <[EMAIL PROTECTED]> wrote: > > > > ztuni ztuni wrote: > > >I'm experiencing an unexpected T_IF error, and after digging through > >miles of code, came up empty. The relevant code, along with the if > >statement

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] Unexpected T_IF

2005-04-25 Thread The Disguised Jedi
oops.sorry...gmail sorted things out wrong and i didn't see the whole conversation. On 4/25/05, The Disguised Jedi <[EMAIL PROTECTED]> wrote: > > please post the whole file, or a few lines before... > > On 4/25/05, Mattias Thorslund <[EMAIL PROTECTED]> wrote: > > > > > > > > ztuni ztuni

Re: [PHP] Unexpected T_IF

2005-04-25 Thread Richard Lynch
On Mon, April 25, 2005 4:29 pm, ztuni ztuni said: > I'm experiencing an unexpected T_IF error, and after digging through > miles of code, came up empty. The relevant code, along with the if > statement > > Parse error: parse error, unexpected T_IF in > /var/www/html/phpBB2/posting.php on line 562

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] Unexpected T_IF

2005-04-25 Thread Mattias Thorslund
ztuni ztuni wrote: I'm experiencing an unexpected T_IF error, and after digging through miles of code, came up empty. The relevant code, along with the if statement Parse error: parse error, unexpected T_IF in /var/www/html/phpBB2/posting.php on line 562 if ( !($result = $db->sql_query($sql)) )

[PHP] Unexpected T_IF

2005-04-25 Thread ztuni ztuni
I'm experiencing an unexpected T_IF error, and after digging through miles of code, came up empty. The relevant code, along with the if statement Parse error: parse error, unexpected T_IF in /var/www/html/phpBB2/posting.php on line 562 if ( !($result = $db->sql_query($sql)) ) {

Re: [PHP] Unexpected results with object to array cast

2004-11-03 Thread Francisco M. Marzoa Alonso
Forget it, it has a lot of sense since self is a reference to the object itself, but the new array is not in the same memory than the source object, so result cannot be as I expected because self is no really "self" within the array, but a reference to an object outside it. The result its perfectly

[PHP] Unexpected results with object to array cast

2004-11-03 Thread Francisco M. Marzoa Alonso
This code: function __construct () { $this->self = $this; } } $Obj = new TestClass (); print_r ( $Obj ); echo ""; $Arr = (array) $Obj; print_r ( $Arr ); ?> Produce the following output: TestClass Object ( [self:private] => TestClass Object *RECURSION* ) Array ( [ TestClass self] => Te

Re: [PHP] unexpected $ error

2004-09-21 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote: hi, i get the following error when trying to run this code (see below): Parse error: parse error, unexpected $ in /full path form.php on line 59 // if the submit buttons has been pressed if (isset($_POST['submit])) missing single quote if (isset($_POST['submit'])) // more c

Re: [PHP] unexpected $ error

2004-09-21 Thread bbonkosk
if (isset($_POST['submit])) (missing close apostrophe here...) if (isset($_POST['submit'])) - not sure if this is THE problem, but A problem for sure. -Brad - Original Message - From: [EMAIL PROTECTED] Date: Tuesday, September 21, 2004 8:36 am Subject: [PHP] unexpecte

RE: [PHP] unexpected $ error

2004-09-21 Thread Jay Blanchard
[snip] [snip] // if the submit buttons has been pressed if (isset($_POST['submit])) { [/snip] Missing the second single-quote in $_POST['submit'] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] unexpected $ error

2004-09-21 Thread luke
hi, i get the following error when trying to run this code (see below): Parse error: parse error, unexpected $ in /full path form.php on line 59 i have checked for unclosed braces - none - and tried uploading the files in ascii format just in case but get the same same error. i have searched ma

Re: [PHP] unexpected T_VARIABLE

2004-08-13 Thread Curt Zirzow
* Thus wrote Dustin Krysak: > Hi there, I am working with a script that I found online to export a > SQL statement (results) to an excel file., now everytime i run the > script, i get the error: > > Parse error: parse error, unexpected T_VARIABLE in > /var/www/html/siteadmin/mysql_export/export

[PHP] unexpected T_VARIABLE

2004-08-13 Thread Dustin Krysak
Hi there, I am working with a script that I found online to export a SQL statement (results) to an excel file., now everytime i run the script, i get the error: Parse error: parse error, unexpected T_VARIABLE in /var/www/html/siteadmin/mysql_export/export.php on line 11 Now the code that is lo

Re: [PHP] Unexpected T_ENCAPSED...

2004-07-24 Thread Philip Olson
> > And quoting integers is not a problem, I even prefer it. IMHO we should > > tell people to quote all values so if someone "forgets" to do any sort of > > input validation (i.e. make sure it's actually an integer) there won't be > > a major problem otherwise problems (including SQL injection) m

Re: [PHP] Unexpected T_ENCAPSED...

2004-07-24 Thread John W. Holmes
Philip Olson wrote: And quoting integers is not a problem, I even prefer it. IMHO we should tell people to quote all values so if someone "forgets" to do any sort of input validation (i.e. make sure it's actually an integer) there won't be a major problem otherwise problems (including SQL injectio

Re: [PHP] Unexpected T_ENCAPSED...

2004-07-24 Thread Curt Zirzow
* Thus wrote Philip Olson: > > Sorry, let me clearify.. unless UserId is an integer, quote it !! > > And quoting integers is not a problem, I even prefer it. IMHO we should > tell people to quote all values so if someone "forgets" to do any sort of One thing to note though, mysql/sqlite is the o

Re: [PHP] Unexpected T_ENCAPSED...

2004-07-24 Thread Philip Olson
> Sorry, let me clearify.. unless UserId is an integer, quote it !! And quoting integers is not a problem, I even prefer it. IMHO we should tell people to quote all values so if someone "forgets" to do any sort of input validation (i.e. make sure it's actually an integer) there won't be a major p

Re: [PHP] Unexpected T_ENCAPSED...

2004-07-24 Thread Jason Davidson
Sorry, let me clearify.. unless UserId is an integer, quote it !! jason On Sat, 24 Jul 2004 12:03:54 -0700, Jason Davidson <[EMAIL PROTECTED]> wrote: > whats in UserId var.. any spaces or nonword chars.. if so, quote it. > > Jason > > > > On Sat, 24 Jul 2004 19:49:04 +0100, Harlequin > <[EMAI

Re: [PHP] Unexpected T_ENCAPSED...

2004-07-24 Thread Jason Davidson
whats in UserId var.. any spaces or nonword chars.. if so, quote it. Jason On Sat, 24 Jul 2004 19:49:04 +0100, Harlequin <[EMAIL PROTECTED]> wrote: > I've been working on a query to retrieve a user's data based on their UserID > that is stored in a variable "$_SESSION['logname']" which underneath

Re: [PHP] Unexpected T_ENCAPSED...

2004-07-24 Thread Marek Kilimajer
Harlequin wrote: I've been working on a query to retrieve a user's data based on their UserID that is stored in a variable "$_SESSION['logname']" which underneath I convert using: $UserID = $_SESSION['logname']; But when I execute a SELECT query: $CaptureDetails = "SELECT * FROM RegisteredMembers

[PHP] Unexpected T_ENCAPSED...

2004-07-24 Thread Harlequin
I've been working on a query to retrieve a user's data based on their UserID that is stored in a variable "$_SESSION['logname']" which underneath I convert using: $UserID = $_SESSION['logname']; But when I execute a SELECT query: $CaptureDetails = "SELECT * FROM RegisteredMembers WHERE UserID

RE: [PHP] Unexpected behaviuor with __CLASS__

2004-06-17 Thread Rick Fletcher
> on RedHat with PHP 4.3.6 the following code produces 'test' - > I'm expecting > 'test2': > > class test { > function printClass() { > echo __CLASS__; > } > } > > class test2 extends test { > } > > test2::printClass(); > > > I would like to get/echo the name of the class call

Re: [PHP] Unexpected behaviuor with __CLASS__

2004-06-16 Thread Torsten Roehr
"Robin Vickery" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wed, 16 Jun 2004 11:49:31 +0200, Torsten Roehr <[EMAIL PROTECTED]> wrote: > > > > Hi list, > > > > on RedHat with PHP 4.3.6 the following code produces 'test' - I'm expecting > > 'test2': > > > > class test { > > f

Re: [PHP] Unexpected behaviuor with __CLASS__

2004-06-16 Thread Robin Vickery
On Wed, 16 Jun 2004 11:49:31 +0200, Torsten Roehr <[EMAIL PROTECTED]> wrote: > > Hi list, > > on RedHat with PHP 4.3.6 the following code produces 'test' - I'm expecting > 'test2': > > class test { > function printClass() { > echo __CLASS__; > } > } > > class test2 extends test

[PHP] Unexpected behaviuor with __CLASS__

2004-06-16 Thread Torsten Roehr
Hi list, on RedHat with PHP 4.3.6 the following code produces 'test' - I'm expecting 'test2': class test { function printClass() { echo __CLASS__; } } class test2 extends test { } test2::printClass(); I would like to get/echo the name of the class calling the method - in my ca

Re: [PHP] unexpected array_diff output

2004-04-30 Thread Frederic Noyer
On 30 avr. 04, at 12:11, Ford, Mike [LSS] wrote: On 30 April 2004 09:47, Frederic Noyer wrote: Hello there ! I am trying to fill and then compare two arrays: one filled by a foreach construct, and the second by a while construct. I check both with a print_r to be sure that both are correc

RE: [PHP] unexpected array_diff output

2004-04-30 Thread Ford, Mike [LSS]
On 30 April 2004 09:47, Frederic Noyer wrote: > Hello there ! > I am trying to fill and then compare two arrays: one > filled by a > foreach construct, and the second by a while construct. > I check both with a print_r to be sure that both are correctly filled > (which seems to be the case).

[PHP] unexpected array_diff output

2004-04-30 Thread Frederic Noyer
Hello there ! I am trying to fill and then compare two arrays: one filled by a foreach construct, and the second by a while construct. I check both with a print_r to be sure that both are correctly filled (which seems to be the case). But then, when I try to compare them with a array_diff , the

RE: [PHP] unexpected $ in ... WTF?

2004-04-15 Thread Ford, Mike [LSS]
On 14 April 2004 21:30, Brian V Bonini wrote: > Parse error: parse error, unexpected $ in /foo/bar/foo.php4 on line > 150 Just to add to previous responses, '$' is PHP's unhelpful notation for "end of file" (think regex end-of-string anchor, if it helps!). Cheers! Mike ---

Re: [PHP] unexpected $ in ... WTF?

2004-04-14 Thread Brian V Bonini
On Wed, 2004-04-14 at 16:47, Curt Zirzow wrote: > * Thus wrote Brian V Bonini ([EMAIL PROTECTED]): > > Parse error: parse error, unexpected $ in /foo/bar/foo.php4 on line 150 > > You're missing a } somewhere. > > if (1 ) { > > ?> Yup, I sure was :-D -- s/:-[(/]/:-)/g BrianGnu

Re: [PHP] unexpected $ in ... WTF?

2004-04-14 Thread Curt Zirzow
* Thus wrote Brian V Bonini ([EMAIL PROTECTED]): > Parse error: parse error, unexpected $ in /foo/bar/foo.php4 on line 150 You're missing a } somewhere. Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi

Re: [PHP] unexpected $ in ... WTF?

2004-04-14 Thread John W. Holmes
From: "Brian V Bonini" <[EMAIL PROTECTED]> > Parse error: parse error, unexpected $ in /foo/bar/foo.php4 on line 150 > > 146: > 147: 148: } > 149: include "foobar.inc.php4"; > 150: ?> You missed a closing bracket or quote somewhere. ---John Holmes... -- PHP General Mailing List (http://www.

Re: [PHP] unexpected $ in ... WTF?

2004-04-14 Thread Daniel Clark
What about line 148 the "{" ... supposed to be there? > Brian V Bonini wrote: >> Parse error: parse error, unexpected $ in /foo/bar/foo.php4 on line 150 >> >> 146: >> 147: > 148: } >> 149: include "foobar.inc.php4"; >> 150: ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

Re: [PHP] unexpected $ in ... WTF?

2004-04-14 Thread John Nichel
Brian V Bonini wrote: Parse error: parse error, unexpected $ in /foo/bar/foo.php4 on line 150 146: 147: Your error is going to be somewhere above that in the script. Forgot a semi-colon, closing bracket/brace/etc, etc. -- ***

[PHP] unexpected $ in ... WTF?

2004-04-14 Thread Brian V Bonini
Parse error: parse error, unexpected $ in /foo/bar/foo.php4 on line 150 146: 147: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Unexpected ";"

2004-02-19 Thread John Nichel
Paul Furman wrote: I don't see what's wrong with this if statement: while ... and ... { if (($pic_num + 1) <= $thumb_num { ^ You're missing a closing parentheses... $tab = ((($pics * $page) - 1) + $pic_num); } Error unexpected ";" on the last line the

Re: [PHP] Unexpected ";"

2004-02-19 Thread Michal Migurski
>I don't see what's wrong with this if statement: > >while ... and ... { > if (($pic_num + 1) <= $thumb_num { > $tab = ((($pics * $page) - 1) + $pic_num); } Looks like you need an editor that's syntax-aware. May I recommend: jEdit, BBedit, UltraEdit? ---

Re: [PHP] Unexpected ";"

2004-02-19 Thread Neil Freeman
You're missing a right bracket within the if statement. Paul Furman wrote: *** This Email Has Been Virus Swept *** I don't see what's wrong with this if statement: while ... and ... { if (($pic_num + 1) <= $

RE: [PHP] Unexpected ";"

2004-02-19 Thread Alex Hogan
19, 2004 11:33 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Unexpected ";" > > I don't see what's wrong with this if statement: > > while ... and ... { >if (($pic_num + 1) <= $thumb_num { > $tab = ((($pics * $page) - 1) + $pic_num); } > > Er

RE: [PHP] Unexpected ";"

2004-02-19 Thread Alex Hogan
Did you close your loop? while ... and ... { if (($pic_num + 1) <= $thumb_num { $tab = ((($pics * $page) - 1) + $pic_num); } } alex ** The contents of this e-mail and any files transmitted with it are confidential

Re: [PHP] Unexpected ";"

2004-02-19 Thread Raditha Dissanayake
should be if (($pic_num + 1) <= $thumb_num) { Paul, with PHP the Parsers error is usally above the line number that's actually reffered to. Paul Furman wrote: I don't see what's wrong with this if statement: while ... and ... { if (($pic_num + 1) <= $thumb_num { $tab = ((($pics * $page)

[PHP] Unexpected ";"

2004-02-19 Thread Paul Furman
I don't see what's wrong with this if statement: while ... and ... { if (($pic_num + 1) <= $thumb_num { $tab = ((($pics * $page) - 1) + $pic_num); } Error unexpected ";" on the last line there. I added some extra () to make sure I had everything together & not two statements or something

RE: [PHP] unexpected include parse error

2004-01-27 Thread Ford, Mike [LSS]
On 27 January 2004 05:18, Shawn McKenzie wrote: > > > > PS I'm on my windows apache server but the forward slash seems to > > work in php & that keeps it portable. I tried it both ways. Yes -- PHP internally translates between / and \ on Windows, precisely for portability reasons. Thus, you ca

RE: [PHP] unexpected include parse error

2004-01-27 Thread Ford, Mike [LSS]
On 27 January 2004 05:50, Paul Furman wrote: > Shawn McKenzie wrote: > > I've noticed in both of your posts that you aren't terminating the > > line before the include with a ; > > Yup, thanks! > > Then I fixed my global problem without bugging you guys too. Actually, no you didn't -- you just

Re: [PHP] unexpected include parse error

2004-01-26 Thread R'twick Niceorgaw
Hi Paul, Quoting Paul Furman <[EMAIL PROTECTED]>: > $dirstr= "./" probably because you are missing a ; at the end? >include 'scandir.php'; >scandir('$dirstr'); you should also change this to scandir($dirstr); > ?> > > parse error, unexpected T_INCLUDE in [the above file] > > if

Re: [PHP] unexpected include parse error

2004-01-26 Thread Paul Furman
Shawn McKenzie wrote: I've noticed in both of your posts that you aren't terminating the line before the include with a ; Yup, thanks! Then I fixed my global problem without bugging you guys too. Final result: #call.php $dirstr= "./"; include 'scandir.php'; scandir('$dirstr'); #scandir.php

Re: [PHP] unexpected include parse error

2004-01-26 Thread Shawn McKenzie
I've noticed in both of your posts that you aren't terminating the line before the include with a ; That would probably help. FYI... If you use / then you don't have to escape it like // only the \. Also, instead of ".\\" you can use '.\' -Shawn "Paul Furman" <[EMAIL PROTECTED]> wrote in messa

Fw: [PHP] unexpected include parse error

2004-01-26 Thread Renan G. Galang
> > Sent: Tuesday, January 27, 2004 1:10 PM > Subject: Re: [PHP] unexpected include parse error > > > > Paul Furman wrote: > > > > > > PS I'm on my windows apache server but the forward slash seems to work > > > > > > > > OK actuall

Re: [PHP] unexpected include parse error

2004-01-26 Thread Paul Furman
Paul Furman wrote: PS I'm on my windows apache server but the forward slash seems to work OK actually, it was the back slash that was causing problems, it only works with a forward slash! but... I've still got the include error: ??? Parse error, unexpected T_INCLUDE #call $dirstr= "./"

Re: [PHP] unexpected include parse error

2004-01-26 Thread Paul Furman
David Obrien wrote: the \ has to be slashed ".\\"; Ah great, thanks! that fixes most of the errors. The following runs where I define the $dirstr in the function but if I try to define it in the page that calls the function, it still gives Parse error, unexpected T_INCLUDE in [#call] #call

  1   2   >