Re: [PHP] Function parameter passed by reference with default value to null

2009-07-06 Thread Lupus Michaelis
David Otton a écrit : So there's some serious impedance mismatch going on there to make both features to work together. Just think of the default value as something I can overwrite, eg: Thanks for this smart explanation. It shines my day. -- Mickaël Wolff aka Lupus Michaelis

Re: [PHP] function array problem

2009-02-18 Thread Thodoris
I've had a bit of a problem with a function I'm using for a form. Essentially, the function looks like this: function addEvent($values = Array('name' = '', 'venue' = '', 'description' = '', 'errors' = Array())) { // code here displays the form } The function is used to both display an

Re: [PHP] function array problem

2009-02-18 Thread Shawn McKenzie
Thodoris wrote: I've had a bit of a problem with a function I'm using for a form. Essentially, the function looks like this: function addEvent($values = Array('name' = '', 'venue' = '', 'description' = '', 'errors' = Array())) { // code here displays the form } The function is used

Re: [PHP] function array problem

2009-02-18 Thread Ashley Sheridan
On Wed, 2009-02-18 at 10:21 -0600, Shawn McKenzie wrote: Thodoris wrote: I've had a bit of a problem with a function I'm using for a form. Essentially, the function looks like this: function addEvent($values = Array('name' = '', 'venue' = '', 'description' = '', 'errors' = Array()))

[PHP] function array problem

2009-02-17 Thread Ashley Sheridan
I've had a bit of a problem with a function I'm using for a form. Essentially, the function looks like this: function addEvent($values = Array('name' = '', 'venue' = '', 'description' = '', 'errors' = Array())) { // code here displays the form } The function is used to both display an empty

Re: [PHP] function array problem

2009-02-17 Thread Bastien Koert
On Tue, Feb 17, 2009 at 3:10 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: I've had a bit of a problem with a function I'm using for a form. Essentially, the function looks like this: function addEvent($values = Array('name' = '', 'venue' = '', 'description' = '', 'errors' = Array()))

Re: [PHP] function array problem

2009-02-17 Thread Ashley Sheridan
On Tue, 2009-02-17 at 15:13 -0500, Bastien Koert wrote: On Tue, Feb 17, 2009 at 3:10 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: I've had a bit of a problem with a function I'm using for a form. Essentially, the function looks like this: function addEvent($values = Array('name'

Re: [PHP] function array problem

2009-02-17 Thread Andrew Ballard
work? Ash www.ashleysheridan.co.uk It seems to work OK for me. I typically use your altered format or the form that Bastien posted (except I usually default the parameters to null rather than an empty string) though. ?php function addEvent($values = Array('name' = '', 'venue

Re: [PHP] function array problem

2009-02-17 Thread Andrew Ballard
On Tue, Feb 17, 2009 at 3:29 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2009-02-17 at 15:13 -0500, Bastien Koert wrote: On Tue, Feb 17, 2009 at 3:10 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: I've had a bit of a problem with a function I'm using for a form.

Re: [PHP] function array problem

2009-02-17 Thread Ashley Sheridan
an empty string) though. ?php function addEvent($values = Array('name' = '', 'venue' = '', 'description' = '', 'errors' = Array())) { // code here displays the form print_r($values); } addEvent(); ? X-Powered-By: PHP/5.2.0 Content-type: text/html Array ( [name

Re: [PHP] function array problem

2009-02-17 Thread Ashley Sheridan
On Tue, 2009-02-17 at 15:21 -0500, Andrew Ballard wrote: On Tue, Feb 17, 2009 at 3:29 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2009-02-17 at 15:13 -0500, Bastien Koert wrote: On Tue, Feb 17, 2009 at 3:10 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: I've had

Re: [PHP] function array problem

2009-02-17 Thread Lewis Wright
What about: function addEvent($values='') { !is_array($values) $values = Array('name' = '', 'venue' = '', 'description' ='', 'errors' = Array()); //rest of the code } It's nice and sort. 2009/2/17 Ashley Sheridan a...@ashleysheridan.co.uk: On Tue, 2009-02-17 at 15:21 -0500, Andrew Ballard

Re: [PHP] function array problem

2009-02-17 Thread Ashley Sheridan
On Tue, 2009-02-17 at 20:35 +, Lewis Wright wrote: What about: function addEvent($values='') { !is_array($values) $values = Array('name' = '', 'venue' = '', 'description' ='', 'errors' = Array()); //rest of the code } It's nice and sort. 2009/2/17 Ashley Sheridan

Re: [PHP] function array problem

2009-02-17 Thread Shawn McKenzie
, or is there a reason why this shouldn't work? Ash www.ashleysheridan.co.uk It seems to work OK for me. I typically use your altered format or the form that Bastien posted (except I usually default the parameters to null rather than an empty string) though. ?php function addEvent($values = Array

Re: [PHP] function array problem

2009-02-17 Thread Eric Butera
On Tue, Feb 17, 2009 at 3:10 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: I've had a bit of a problem with a function I'm using for a form. Essentially, the function looks like this: function addEvent($values = Array('name' = '', 'venue' = '', 'description' = '', 'errors' = Array()))

[PHP] Function parameters and arrays

2008-09-18 Thread Frank Stanovcak
I am trying to pass a multi dimmed array as a variable parameter to a custom function to build a query for me. Here is the basic code and what I am getting. $WhereList[0][0] = 'OESalesOrder.OrderNo'; $WhereList[0][1] = '='; $WhereList[0][2] = '2272'; $SQLString =

Re: [PHP] Function parameters and arrays

2008-09-18 Thread Stut
On 18 Sep 2008, at 16:29, Frank Stanovcak wrote: I am trying to pass a multi dimmed array as a variable parameter to a custom function to build a query for me. Here is the basic code and what I am getting. $WhereList[0][0] = 'OESalesOrder.OrderNo'; $WhereList[0][1] = '='; $WhereList[0][2]

RE: [PHP] Function parameters and arrays

2008-09-18 Thread Simcha
- From: Frank Stanovcak [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2008 5:30 PM To: php-general@lists.php.net Subject: [PHP] Function parameters and arrays I am trying to pass a multi dimmed array as a variable parameter to a custom function to build a query for me. Here is the basic

Re: [PHP] Function parameters and arrays

2008-09-18 Thread Jim Lucas
Frank Stanovcak wrote: I am trying to pass a multi dimmed array as a variable parameter to a custom function to build a query for me. Here is the basic code and what I am getting. $WhereList[0][0] = 'OESalesOrder.OrderNo'; $WhereList[0][1] = '='; $WhereList[0][2] = '2272'; $SQLString =

[PHP] Function __call

2008-08-30 Thread Diogo Neves
hi all, I'm sending this email only to ask if someone know if the works of __call in private methods is bug or feature. ex. class user { public function __call ( $name, $arguments ) { do something return call_user_func( array( $this, $name ), $arguments ); } private function xpto ( $arguments )

Re: [PHP] Function __call

2008-08-30 Thread Jochem Maas
Diogo Neves schreef: hi all, I'm sending this email only to ask if someone know if the works of __call in private methods is bug or feature. ex. class user { public function __call ( $name, $arguments ) { do something return call_user_func( array( $this, $name ), $arguments ); the fatal

Re: [PHP] Function __call

2008-08-30 Thread Diogo Neves
thanks, well, the 'new' woks the same with ou without '()' after class, I think... and I now how it works, i only don't understand why... if the method is not available outside of class it should go to __call function like if it doesn't exist... it doesn't make any sense to anyone else? On

Re: [PHP] Function __call

2008-08-30 Thread Jochem Maas
Diogo Neves schreef: thanks, well, the 'new' woks the same with ou without '()' after class, I think... you think? I gave you code that shows exactly that. but you wrote the following: new $user = new user(); which is not correct, the first new in that line is a syntax error. that

Re: [PHP] Function __call

2008-08-30 Thread Jochem Maas
please keep replies on list unless your intending to pay me an hourly fee ... Diogo Neves schreef: On Sat, Aug 30, 2008 at 4:40 PM, Jochem Maas [EMAIL PROTECTED] wrote: Diogo Neves schreef: ... nop... I wanna manipulate the $this and the $arguments, and possible don't even execute the

Re: [PHP] Function __call

2008-08-30 Thread Diogo Neves
Hi, On Sat, Aug 30, 2008 at 6:20 PM, Jochem Maas [EMAIL PROTECTED] wrote: please keep replies on list unless your intending to pay me an hourly fee ... Yeap, i'm new in the list and i missed te cc of list... i'll try to remember, sorry Diogo Neves schreef: Now in understand schreef is from

Re: [PHP] Function __call

2008-08-30 Thread Jochem Maas
Diogo Neves schreef: Hi, On Sat, Aug 30, 2008 at 6:20 PM, Jochem Maas [EMAIL PROTECTED] wrote: please keep replies on list unless your intending to pay me an hourly fee ... Yeap, i'm new in the list and i missed te cc of list... i'll try to remember, sorry okay. Diogo Neves schreef:

[PHP] Function not in the documentation

2008-05-20 Thread Christoph Boget
I ran across a PHP function, strip_illegal_chars(), but can't seem to find anything about it in the documentation. Does anyone know precisely what it does? Or where I can find actual documentation for that function? thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] Function not in the documentation

2008-05-20 Thread Wolf
Christoph Boget wrote: I ran across a PHP function, strip_illegal_chars(), but can't seem to find anything about it in the documentation. Does anyone know precisely what it does? Or where I can find actual documentation for that function? thnx, Chris Sure, whatever code you found

Re: [PHP] Function not in the documentation

2008-05-20 Thread shiplu
On Tue, May 20, 2008 at 8:24 AM, Christoph Boget [EMAIL PROTECTED] wrote: I ran across a PHP function, strip_illegal_chars(), but can't seem to find anything about it in the documentation. Does anyone know precisely what it does? Or where I can find actual documentation

Re: [PHP] Function not in the documentation

2008-05-20 Thread Zoltán Németh
I ran across a PHP function, strip_illegal_chars(), but can't seem to find anything about it in the documentation. Does anyone know precisely what it does? Or where I can find actual documentation for that function? it is not in the PHP source: http://lxr.php.net/search?string

Re: [PHP] function returns no value

2008-04-21 Thread Ali Reza Sajedi
Message - From: Nathan Nobbe To: Ali Reza Sajedi Cc: php-general@lists.php.net Sent: Monday, April 21, 2008 12:42 AM Subject: Re: [PHP] function returns no value On Sun, Apr 20, 2008 at 4:51 PM, Ali Reza Sajedi [EMAIL PROTECTED] wrote: Hello, with the following call I try to print

Re: [PHP] function returns no value

2008-04-21 Thread Thijs Lensselink
be printed. Any ideas? Regards Ali - Original Message - From: Nathan Nobbe To: Ali Reza Sajedi Cc: php-general@lists.php.net Sent: Monday, April 21, 2008 12:42 AM Subject: Re: [PHP] function returns no value On Sun, Apr 20, 2008 at 4:51 PM, Ali Reza Sajedi [EMAIL PROTECTED] wrote: Hello

Re: [PHP] function returns no value

2008-04-21 Thread Ali Reza Sajedi
using $result-fields[fa] did solve the problem. thanks very much Thijs - Original Message - From: Thijs Lensselink [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Monday, April 21, 2008 2:48 PM Subject: Re: [PHP] function returns no value Quoting Ali Reza Sajedi [EMAIL

[PHP] function returns no value

2008-04-20 Thread Ali Reza Sajedi
Hello, with the following call I try to print a string out of DB echo $allg-translate($db, $lang, 14, auth/authCallback, 4); function translate () should do a DB querry and returns the requested string. Although the querry yields a positive result, the function returns no value. Here is

Re: [PHP] function returns no value

2008-04-20 Thread Nathan Nobbe
On Sun, Apr 20, 2008 at 4:51 PM, Ali Reza Sajedi [EMAIL PROTECTED] wrote: Hello, with the following call I try to print a string out of DB echo $allg-translate($db, $lang, 14, auth/authCallback, 4); function translate () should do a DB querry and returns the requested string. Although the

Re: [PHP] function returns no value

2008-04-20 Thread Liran Oz
the wrong index (0) Liran - Original Message - From: Ali Reza Sajedi [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Sunday, April 20, 2008 11:51 PM Subject: [PHP] function returns no value Hello, with the following call I try to print a string out of DB echo $allg-translate($db

Re: [PHP] Function-return-array idea

2008-01-17 Thread Nathan Nobbe
On Jan 16, 2008 6:32 PM, Stijn Leenknegt [EMAIL PROTECTED] wrote: Hello I've an idea for PHP6. Let's kickoff with an example. ?php $info = getUserInformation($id); //return an array with all the information of an user. echo $info['naam']; ? This is nice, but when I want one element of

Re: [PHP] Function-return-array idea

2008-01-17 Thread Eric Butera
On Jan 16, 2008 6:32 PM, Stijn Leenknegt [EMAIL PROTECTED] wrote: Hello I've an idea for PHP6. Let's kickoff with an example. ?php $info = getUserInformation($id); //return an array with all the information of an user. echo $info['naam']; ? This is nice, but when I want one element of

Re: [PHP] Function-return-array idea

2008-01-17 Thread Jim Lucas
Jim Lucas wrote: I think this would be an easier/quicker fix for you then requesting that the PHP developers re-write a large portion of the way PHP currently works. Here is the reference that I have been looking for. http://en.wikipedia.org/wiki/Message_passing Jim -- PHP General Mailing

[PHP] Function-return-array idea

2008-01-16 Thread Stijn Leenknegt
Hello I've an idea for PHP6. Let's kickoff with an example. ?php $info = getUserInformation($id); //return an array with all the information of an user. echo $info['naam']; ? This is nice, but when I want one element of the returned array, I have to store the returned array into a variable and

Re: [PHP] Function-return-array idea

2008-01-16 Thread Richard Lynch
On Wed, January 16, 2008 5:32 pm, Stijn Leenknegt wrote: I've an idea for PHP6. Let's kickoff with an example. This belongs on php-internals... ?php echo getUserInformation($id)['naam']; ? where it has already been discussed at length, and, as I recall, rejected as too obfuscated for the

Re: [PHP] Function-return-array idea

2008-01-16 Thread Jim Lucas
I think this would be an easier/quicker fix for you then requesting that the PHP developers re-write a large portion of the way PHP currently works. ?php function i($arr, $i) { return $arr[$i]; } echo i(getUserInformation($id), 'naam'); #or echo i($object-fetchObjects(), 0)-method

[PHP] PHP function to list all mysql tables used in a script

2008-01-16 Thread Javed Khan
Hello All, I have php script which performs various sql operations, like insert row in table A, delete row from Table B and Update rows in table C. Now I would like to display all those tables that are affected by my script. Can anyone send me a function or script if it is already available?

Re: [PHP] PHP function to list all mysql tables used in a script

2008-01-16 Thread Chris
Javed Khan wrote: Hello All, I have php script which performs various sql operations, like insert row in table A, delete row from Table B and Update rows in table C. Now I would like to display all those tables that are affected by my script. Can anyone send me a function or script if it is

Re: [PHP] Function-return-array idea

2008-01-16 Thread Per Jessen
Stijn Leenknegt wrote: This is nice, but when I want one element of the returned array, I have to store the returned array into a variable and then call the variable. The next code example is my idea. ?php echo getUserInformation($id)['naam']; ? Let's look further then this small

Re: [PHP] function I created doesn't work

2008-01-04 Thread afan pasalic
Daniel Brown wrote: On Jan 4, 2008 12:06 PM, afan pasalic [EMAIL PROTECTED] wrote: hi I have function function get_content($client_id, $form_id, $index1) { $query = mysql_query( SELECT content FROM infos WHERE

[PHP] function I created doesn't work

2008-01-04 Thread afan pasalic
hi I have function function get_content($client_id, $form_id, $index1) { $query = mysql_query( SELECT content FROM infos WHERE client_id=.$client_id. AND form_id=.$form_id. AND index1='.$index1.'); if

Re: [PHP] function I created doesn't work

2008-01-04 Thread Daniel Brown
On Jan 4, 2008 12:06 PM, afan pasalic [EMAIL PROTECTED] wrote: hi I have function function get_content($client_id, $form_id, $index1) { $query = mysql_query( SELECT content FROM infos WHERE

Re: [PHP] function I created doesn't work

2008-01-04 Thread afan pasalic
Samuel Vogel wrote: Explanation of your code: $CONTENT = get_content(12, 104, 'merchant'); echo $CONTENT; This does not work, because you don't use a return in your function. This means that the function does not return a value. Now in the function you assign a value to $CONTENT. That

RE: [PHP] function I created doesn't work

2008-01-04 Thread Ford, Mike
On 04 January 2008 17:06, afan pasalic wrote: hi I have function function get_content($client_id, $form_id, $index1) { $query = mysql_query( SELECT content FROM infos WHERE client_id=.$client_id. AND

Re: [PHP] function I created doesn't work

2008-01-04 Thread afan pasalic
Daniel Brown wrote: On Jan 4, 2008 12:28 PM, afan pasalic [EMAIL PROTECTED] wrote: Daniel Brown wrote: On Jan 4, 2008 12:06 PM, afan pasalic [EMAIL PROTECTED] wrote: hi I have function function get_content($client_id, $form_id, $index1) { $query = mysql_query(

Re: [PHP] function I created doesn't work

2008-01-04 Thread Daniel Brown
On Jan 4, 2008 12:52 PM, afan pasalic [EMAIL PROTECTED] wrote: I think you didn't understand my question: I know why the function work in 2nd example. My question was why I'm not getting the result in 1st example? What am I doing wrong. And, as far as I know, I think it doesn't have anything

Re: [PHP] function I created doesn't work

2008-01-04 Thread Jim Lucas
afan pasalic wrote: hi I have function function get_content($client_id, $form_id, $index1) { $query = mysql_query( SELECT content FROM infos WHERE client_id=.$client_id. AND form_id=.$form_id. AND

Re: [PHP] function I created doesn't work

2008-01-04 Thread Daniel Brown
On Jan 4, 2008 12:52 PM, afan pasalic [EMAIL PROTECTED] wrote: I think you didn't understand my question: I know why the function work in 2nd example. My question was why I'm not getting the result in 1st example? What am I doing wrong. And, as far as I know, I think it doesn't have anything

Re: [PHP] function I created doesn't work

2008-01-04 Thread afan pasalic
Daniel Brown wrote: On Jan 4, 2008 12:52 PM, afan pasalic [EMAIL PROTECTED] wrote: I think you didn't understand my question: I know why the function work in 2nd example. My question was why I'm not getting the result in 1st example? What am I doing wrong. And, as far as I know, I think it

Re: [PHP] function I created doesn't work

2008-01-04 Thread Jim Lucas
afan pasalic wrote: Daniel Brown wrote: On Jan 4, 2008 12:52 PM, afan pasalic [EMAIL PROTECTED] wrote: I think you didn't understand my question: I know why the function work in 2nd example. My question was why I'm not getting the result in 1st example? What am I doing wrong. And, as far as I

Re: [PHP] function I created doesn't work

2008-01-04 Thread Daniel Brown
On Jan 4, 2008 12:28 PM, afan pasalic [EMAIL PROTECTED] wrote: Daniel Brown wrote: On Jan 4, 2008 12:06 PM, afan pasalic [EMAIL PROTECTED] wrote: hi I have function function get_content($client_id, $form_id, $index1) { $query = mysql_query( SELECT

Re: [PHP] function I created doesn't work [SOLVED]

2008-01-04 Thread afan pasalic
: ?php function get_InfoContent($instance_id, $form_id, $InfoKey) { $query = mysql_query( SELECT instance_id, form_id, InfoContent FROM forms_single_info WHERE instance_id=.$instance_id. AND form_id=.$form_id. AND InfoKey

Re: [PHP] function I created doesn't work

2008-01-04 Thread afan pasalic
Jim Lucas wrote: afan pasalic wrote: Daniel Brown wrote: On Jan 4, 2008 12:52 PM, afan pasalic [EMAIL PROTECTED] wrote: I think you didn't understand my question: I know why the function work in 2nd example. My question was why I'm not getting the result in 1st example? What am I doing

Re: [PHP] Function variables in classes

2007-11-02 Thread rohini
Hi paul, Why you are trying to use the scope resolution operator see you can use this way simply. Code: ** ?php class foobar { function bar2 () { echo Yep, in bar2() right now\n; } public function foo2 () { $a = bar2;// Experiment 0 $a();

Re: [PHP] Function return

2007-11-02 Thread Daniel Brown
On 11/2/07, Dan Shirah [EMAIL PROTECTED] wrote: TGIF!! I believe that's Copyright (C) TCompuserve. Careful you don't get tsued. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 Give a man a fish, he'll eat for a day. Then you'll find out he was allergic

Re: [PHP] Function return

2007-11-02 Thread Nathan Nobbe
On 11/2/07, Stut [EMAIL PROTECTED] wrote: Dan Shirah wrote: That is correct, the due_date field should only accept a valid date format, such as MM/DD/. To bypass the need for a validation check for this field I simply set the text field to disabled and supplied the user with a

Re: [PHP] Function return

2007-11-02 Thread Stut
Dan Shirah wrote: That is correct, the due_date field should only accept a valid date format, such as MM/DD/. To bypass the need for a validation check for this field I simply set the text field to disabled and supplied the user with a javascript popup calendar that upon selection populates

Re: [PHP] Function return

2007-11-02 Thread Nathan Nobbe
On 11/2/07, Dan Shirah [EMAIL PROTECTED] wrote: Ah, okay. So I could probably simplfy it more by trimming it from the start like this?? $due_date = trim($_POST['due_date']); that works; i personally prefer to initialize a variable then only set it if the user input meets some conditions;

Re: [PHP] Function return

2007-11-02 Thread Nathan Nobbe
On 11/2/07, Dan Shirah [EMAIL PROTECTED] wrote: Okay, so instead I should probably use: if($due_date != ) $insert2.=, due_date='$due_date'; Instead of using empty() using emtpy is fine; just store the results of trim in a temporary variable: $trimmed = trim($due_date);

Re: [PHP] Function return

2007-11-02 Thread Dan Shirah
Okay, so instead I should probably use: if($due_date != ) $insert2.=, due_date='$due_date'; Instead of using empty() On 11/2/07, Nathan Nobbe [EMAIL PROTECTED] wrote: On 11/2/07, Dan Shirah [EMAIL PROTECTED] wrote: TGIF!! I have an insert statement that checks to see if a condition

Re: [PHP] Function return

2007-11-02 Thread Nathan Nobbe
On 11/2/07, Dan Shirah [EMAIL PROTECTED] wrote: TGIF!! I have an insert statement that checks to see if a condition is met. If it is, then it adds that value to the insert statement. However, when I try to run it I get the error: Can't use function return value in write context Below

[PHP] Function return

2007-11-02 Thread Dan Shirah
TGIF!! I have an insert statement that checks to see if a condition is met. If it is, then it adds that value to the insert statement. However, when I try to run it I get the error: Can't use function return value in write context Below is a sample of what I am using which gives me the

Re: [PHP] Function variables in classes

2007-11-02 Thread Nathan Nobbe
On 11/2/07, rohini [EMAIL PROTECTED] wrote: Hi paul, Why you are trying to use the scope resolution operator see you can use this way simply. Code: ** ?php class foobar { function bar2 () { echo Yep, in bar2() right now\n; } public function foo2 () {

Re: [PHP] Function return

2007-11-02 Thread Dan Shirah
Ah, okay. So I could probably simplfy it more by trimming it from the start like this?? $due_date = trim($_POST['due_date']); On 11/2/07, Nathan Nobbe [EMAIL PROTECTED] wrote: On 11/2/07, Dan Shirah [EMAIL PROTECTED] wrote: Okay, so instead I should probably use: if($due_date != )

Re: [PHP] Function return

2007-11-02 Thread Dan Shirah
That is correct, the due_date field should only accept a valid date format, such as MM/DD/. To bypass the need for a validation check for this field I simply set the text field to disabled and supplied the user with a javascript popup calendar that upon selection populates the date in the

Re: [PHP] Function return

2007-11-02 Thread Dan
I know that while you should be doing proper validation on the server side and everything, you could somewhat diminish the risk of someone building their own form and just posting. If you were to check the referring site which made the post then you could be pretty sure someone didn't make

[PHP] Function variables in classes

2007-11-01 Thread Paul van Haren
Hi there, I'm trying to execute function variables. This works fine outside class code, but gives a fatal error when run within a class. The demo code is here: ?php function bar1 () { echo Yep, in bar1() right now\n; } function foo1

Re: [PHP] Function variables in classes

2007-11-01 Thread Ivar van der Burg
: ?php function bar1 () { echo Yep, in bar1() right now\n; } function foo1 () { bar1(); $a = bar1; print_r ($a); echo \n; $a(); } class foobar { function bar2

Re: [PHP] Function variables in classes

2007-11-01 Thread Paul van Haren
I just did. The result is the same however Regards, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Function variables in classes

2007-11-01 Thread Eric Butera
On Nov 1, 2007, at 7:10 AM, Paul van Haren wrote: Hi there, I'm trying to execute function variables. This works fine outside class code, but gives a fatal error when run within a class. The demo code is here: ?php function bar1 () { echo Yep, in bar1() right

Re: [PHP] Function variables in classes

2007-11-01 Thread Nathan Nobbe
On 11/1/07, Eric Butera [EMAIL PROTECTED] wrote: I don't know if this has been said yet, but in 5.3 they added this: Dynamic static calls: $c = classname; $c::someMetod(); apparently it works in 5.2.4 as well: ?php class Foo { static public function staticMethod() { echo

[PHP] php function

2007-10-01 Thread edwardspl
Dear All, Mine is FC6 System. So, the php come with it... If disable the function of phpinfo(), then all of the setting will be returned to the default ! Any solution for help ? Thanks ! Edward. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] function - action

2007-08-10 Thread Martin Alterisio
2007/8/7, Richard Lynch [EMAIL PROTECTED]: On Fri, August 3, 2007 1:38 am, Ralph Kutschera wrote: I'm working on a project, where we distinguish between functions and actions in design, although in PHP both are implemented as functions. Is there a chance that PHP can use the word

Re: [PHP] function - action

2007-08-10 Thread Martin Alterisio
2007/8/3, Ken Tozier [EMAIL PROTECTED]: On Aug 3, 2007, at 9:39 AM, Ken Tozier wrote: On Aug 3, 2007, at 2:38 AM, Ralph Kutschera wrote: Hallo! I'm working on a project, where we distinguish between functions and actions in design, although in PHP both are implemented as

Re: [PHP] function - action

2007-08-10 Thread Richard Lynch
On Fri, August 10, 2007 9:40 am, Martin Alterisio wrote: 2007/8/7, Richard Lynch [EMAIL PROTECTED]: On Fri, August 3, 2007 1:38 am, Ralph Kutschera wrote: I'm working on a project, where we distinguish between functions and actions in design, although in PHP both are implemented as

Re: [PHP] function - action

2007-08-07 Thread Richard Lynch
On Fri, August 3, 2007 1:38 am, Ralph Kutschera wrote: I'm working on a project, where we distinguish between functions and actions in design, although in PHP both are implemented as functions. Is there a chance that PHP can use the word action as function? E.g.: public function

[PHP] function - action

2007-08-03 Thread Ralph Kutschera
Hallo! I'm working on a project, where we distinguish between functions and actions in design, although in PHP both are implemented as functions. Is there a chance that PHP can use the word action as function? E.g.: public function doSomething() { } public action doSomethingElse() { ... }

Re: [PHP] function - action

2007-08-03 Thread Ken Tozier
On Aug 3, 2007, at 9:39 AM, Ken Tozier wrote: On Aug 3, 2007, at 2:38 AM, Ralph Kutschera wrote: Hallo! I'm working on a project, where we distinguish between functions and actions in design, although in PHP both are implemented as functions. Is there a chance that PHP can use the

RE: [PHP] function - action

2007-08-03 Thread Jay Blanchard
[snip] I'm working on a project, where we distinguish between functions and actions in design, although in PHP both are implemented as functions. Is there a chance that PHP can use the word action as function? E.g.: public function doSomething() { } public action doSomethingElse() { ... }

Re: [PHP] function - action

2007-08-03 Thread Ken Tozier
On Aug 3, 2007, at 2:38 AM, Ralph Kutschera wrote: Hallo! I'm working on a project, where we distinguish between functions and actions in design, although in PHP both are implemented as functions. Is there a chance that PHP can use the word action as function? E.g.: public function

[PHP] Re: [PHP-DEV] [PHP4] Logging native PHP function calls

2007-06-14 Thread Richard Lynch
You want: (number of apache children) X (number of mysql usernames) (number of mysql connections allowed in /etc/my.cnf) If you really have 150 MaxClients in httpd.conf and 140 mysql usernames,

Re: [PHP] Function Declared in Included File Not Being Found

2007-05-13 Thread Chris
Richard, Neither removing the if/else nor the function_exists() not call worked. If I declared the function in the same file I called it works even when defining it after the call. If the function is declaring in a different file than the one I call it in and I include the files after the

Re: [PHP] Function Declared in Included File Not Being Found

2007-05-13 Thread Stut
Chris wrote: Richard, Neither removing the if/else nor the function_exists() not call worked. If I declared the function in the same file I called it works even when defining it after the call. If the function is declaring in a different file than the one I call it in and I include the

Re: [PHP] Function Declared in Included File Not Being Found

2007-05-12 Thread Richard Lynch
On Fri, May 11, 2007 3:43 pm, Chris wrote: Hello, According to the PHP manual on functions (http://www.php.net/manual/ en/language.functions.php): In PHP 3, functions must be defined before they are referenced. No such requirement exists since PHP 4. Except when a function is conditionally

Re: [PHP] Function Declared in Included File Not Being Found

2007-05-12 Thread Richard Lynch
On Fri, May 11, 2007 6:15 pm, jekillen wrote: One reason I believe is that including a file in an included file will not work. file a includes file b wnich includes file c, code in file c will not register. (if I remember the manual correctly) I dunno what you were reading, but almost for

[PHP] Function Declared in Included File Not Being Found

2007-05-11 Thread Chris
'; ? --- File: b.php ?php require 'c.php'; ? --- File: c.php ?php function test() { return Function was called!; } ? Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Function Declared in Included File Not Being Found

2007-05-11 Thread jekillen
!; } require 'b.php'; ? --- File: b.php ?php require 'c.php'; ? --- File: c.php ?php function test() { return Function was called!; } ? Chris One reason I believe is that including a file in an included file will not work

Re: [PHP] Function Declared in Included File Not Being Found

2007-05-11 Thread Robert Cummings
() does not exist!; } require 'b.php'; ? --- File: b.php ?php require 'c.php'; ? --- File: c.php ?php function test() { return Function was called!; } ? Chris

Re: [PHP] Function Declared in Included File Not Being Found

2007-05-11 Thread Chris
'; ? --- File: b.php ?php require 'c.php'; ? --- File: c.php ?php function test() { return Function was called!; } ? Chris -- .. | InterJinn Application Framework - http://www.interjinn.com

Re: [PHP] Function returning but continues execution

2007-01-23 Thread David Mytton
Jochem Maas wrote: rewrite 'section/addfriend/will' - 'index.php?cmd=section/addfriendusername=will' rewrite 'section/addfriend/templates/js/jquery.js' - 'index.php?cmd=section/addfriendusername=templates/js/jquery.js' and what's the bet that this second rewritten url is the bogey man here.

[PHP] Function returning but continues execution

2007-01-22 Thread David Mytton
Hi, I have come across what appears to be a bug in PHP, but one that I am having difficulty writing test code for. Also, the bug only happens on a Linux build of PHP - the code is working as expected on Windows. This is on both PHP 5.2.0 and the very latest snapshots: Windows: 5.2.1RC4-dev

Re: [PHP] Function returning but continues execution

2007-01-22 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-22 15:17:16 +: The key is that the function is returning false but it continues to execute! If I stick in an exit; after the in_array() check at point #4, this doesn't happen. There are no other places where this function is called, and it is only called

Re: [PHP] Function returning but continues execution

2007-01-22 Thread David Mytton
I can't see how there is a bug in my code if when I echo the contents of the 2 variables, they are exactly the same as when I set them manually. Except in the former the function continues executing but in the latter it doesn't. I also cannot see how the function can return false and execute

Re: [PHP] Function returning but continues execution

2007-01-22 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-22 15:31:55 +: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-01-22 15:17:16 +: The key is that the function is returning false but it continues to execute! If I stick in an exit; after the in_array() check at point #4, this doesn't happen. There are

<    1   2   3   4   5   6   7   8   9   >