Re: [PHP] Functions/methods aliases in PHp 5.2

2011-05-16 Thread David Harkness
On Sun, May 15, 2011 at 3:15 PM, Richard Quadling rquadl...@gmail.comwrote: Personally, I would recommend using 1 naming convention and sticking with it. I wholeheartedly agree. Multiple method names is not flexibility--it's confusion and an open invitation for bugs. Plus, even with two

Re: [PHP] Functions/methods aliases in PHp 5.2

2011-05-15 Thread Richard Quadling
On 15 May 2011 21:45, Andre Polykanine an...@oire.org wrote: Hi everyone, Is there any possibility to make a method or function alias in PHP? Yes, I know I can do the following: ?php function foo_bar($x) { // And so we code... return $result; } function FooBar($x) { return foo_bar($x)

Re: [PHP] Functions/methods aliases in PHp 5.2

2011-05-15 Thread Andre Polykanine
Hello Richard, I'd like to make a database wrapping class (yet another one, aha!) as flexible, as possible. So I'd like to make possible to call, for example, $db-num_rows($result) and $db-NumRows($result) And was just wondering :-). -- With best regards from

Re: [PHP] Functions/methods aliases in PHp 5.2

2011-05-15 Thread Richard Quadling
On 15 May 2011 23:06, Andre Polykanine an...@oire.org wrote: Hello Richard,      I'd  like  to  make  a database wrapping class (yet another one, aha!) as flexible, as possible. So I'd like to make possible to call, for example, $db-num_rows($result)                     and

Re: [PHP] functions and global variables

2010-07-19 Thread Shreyas Agasthya
My two cents on this one. Modify the $name within the function and print it. Modify the$name outside the function (means the non-global-declared $name) and print it. You will know the difference. --Shreyas On Mon, Jul 19, 2010 at 7:41 AM, Paul M Foster pa...@quillandmouse.comwrote: On Sun,

Re: [PHP] functions and global variables

2010-07-19 Thread Simcha Younger
On Mon, 19 Jul 2010 13:37:12 +0530 Shreyas Agasthya shreya...@gmail.com wrote: My two cents on this one. Modify the $name within the function and print it. Modify the$name outside the function (means the non-global-declared $name) and print it. You will know the difference.

Re: [PHP] functions and global variables

2010-07-18 Thread Paul M Foster
On Sun, Jul 18, 2010 at 06:37:30PM -0400, David Mehler wrote: Hello, I've got a file with a variable declared in it. For purposes of this post: $name = $_POST['name']; Now a little later in the same file I have a custom function call that outputs some information. In that information is

Re: [PHP] Functions not available when run as Scheduled Task?

2008-02-27 Thread Ray Hauge
Brian Dunning wrote: Don't laugh but we have a Win 2003 Server set up with WAMP, and the PHP/MySQL scripts work great. I set one up to run as a scheduled task: C:\php5\php.exe D:\wamp\www\scriptname.php ...but nothing happens and the Scheduled Tasks log says that it exited with an (ff). So I

Re: [PHP] Functions not available when run as Scheduled Task?

2008-02-27 Thread Daniel Brown
On Wed, Feb 27, 2008 at 6:37 PM, Brian Dunning [EMAIL PROTECTED] wrote: Don't laugh but we have a Win 2003 Server set up with WAMP, and the PHP/MySQL scripts work great. I set one up to run as a scheduled task: C:\php5\php.exe D:\wamp\www\scriptname.php ...but nothing happens and the

RE: [PHP] Functions not available when run as Scheduled Task?

2008-02-27 Thread Andrés Robinet
-Original Message- From: Ray Hauge [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 27, 2008 6:42 PM To: Brian Dunning Cc: php-general@lists.php.net Subject: Re: [PHP] Functions not available when run as Scheduled Task? Brian Dunning wrote: Don't laugh but we have a Win 2003

Re: [PHP] Functions not available when run as Scheduled Task?

2008-02-27 Thread Jochem Maas
Brian Dunning schreef: Don't laugh but we have a Win 2003 Server set up with WAMP, and the PHP/MySQL scripts work great. I set one up to run as a scheduled task: C:\php5\php.exe D:\wamp\www\scriptname.php ...but nothing happens and the Scheduled Tasks log says that it exited with an (ff). So

Re: [PHP] Functions not available when run as Scheduled Task?

2008-02-27 Thread Brian Dunning
Adding this command solved it. Thanks to everyone! I did not even know this command existed. On Feb 27, 2008, at 3:46 PM, Andrés Robinet wrote: Use the -c command line option to be sure, for example: C:\php5\php.exe -c C:\php5\php.ini -f D:\wamp\www\scriptname.php -- -- PHP General

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Thijs Lensselink
Jason Pruim wrote: Hi everyone :) So partly to get an answer, and partly to boost my post rankings for the week I have a question. I am attempting to write an authentication function which would query a database, check the username/password and return true if it matches. If it doesn't

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Jim Lucas
Jason Pruim wrote: Hi everyone :) So partly to get an answer, and partly to boost my post rankings for the week I have a question. I am attempting to write an authentication function which would query a database, check the username/password and return true if it matches. If it doesn't

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Nathan Nobbe
On Jan 25, 2008 3:35 PM, Thijs Lensselink [EMAIL PROTECTED] wrote: Change: }return $authenticated; to return $authenticated; } else it will never return the value from the function. But it will always give you undefined variable notice nice catch ;) -nathan

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Richard Lynch
On Fri, January 25, 2008 1:59 pm, Jason Pruim wrote: Hi everyone :) So partly to get an answer, and partly to boost my post rankings for the week I have a question. I am attempting to write an authentication function which would query a database, check the username/password and return

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Nathan Nobbe
?PHP /// initialize the return variable $authenticated = false; function authentication(){ if(!isset($user) || !isset($pass)) { return false; } /// -- i would do it a bit nicer than this, but you get the idea if($user $pass) { // Keep in mind, PASSWORD has

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Thijs Lensselink
Nathan Nobbe wrote: On Jan 25, 2008 3:35 PM, Thijs Lensselink [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Change: }return $authenticated; to return $authenticated; } else it will never return the value from the function. But it will always give you

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Nathan Nobbe
oh; i just noticed you dont have formal parameters for $user or $pass; so, function authentication($user, $pass) { /// ... then you can remove the first line i put in there on the last post :) } -nathan

Re: [PHP] Functions with Static Variables vs. Classes

2007-11-29 Thread Zoltán Németh
2007. 11. 29, csütörtök keltezéssel 14.18-kor [EMAIL PROTECTED] ezt írta: For some simple applications I use a function to collect values in a static variable and to return them when called in a special way, just like this (fairly senseless) example: function example($elem='') { static

Re: [PHP] Functions with Static Variables vs. Classes

2007-11-29 Thread news_yodpeirs
From: Zoltán Németh [EMAIL PROTECTED] function example($elem='') { static $store = array(); AFAIK the above line should cause an error on the second run of the function, as you declare the same static variable for the second time. or am I wrong? I think so - otherwise static

Re: [PHP] Functions with Static Variables vs. Classes

2007-11-29 Thread Jochem Maas
[EMAIL PROTECTED] wrote: From: Zoltán Németh [EMAIL PROTECTED] function example($elem='') { static $store = array(); AFAIK the above line should cause an error on the second run of the function, as you declare the same static variable for the second time. or am I wrong? indeed you

Re: [PHP] functions versus includes

2007-11-11 Thread Chris
Frank Lopes wrote: I just started using PHP and got to think... Without getting into the discussion of best practices, strictly from a performance perspective, what is faster: a function or an include? For example I have a block of text that needs to appear mutliple times throughout the

Re: [PHP] functions versus includes

2007-11-11 Thread Robert Cummings
On Mon, 2007-11-12 at 11:27 +1100, Chris wrote: Frank Lopes wrote: I just started using PHP and got to think... Without getting into the discussion of best practices, strictly from a performance perspective, what is faster: a function or an include? For example I have a block of

Re: [PHP] functions versus includes

2007-11-11 Thread Nathan Nobbe
On Nov 11, 2007 9:32 PM, Robert Cummings [EMAIL PROTECTED] wrote: On Mon, 2007-11-12 at 11:27 +1100, Chris wrote: Frank Lopes wrote: I just started using PHP and got to think... Without getting into the discussion of best practices, strictly from a performance perspective, what

Re: [PHP] functions versus includes

2007-11-11 Thread Chris
Nathan Nobbe wrote: On Nov 11, 2007 9:32 PM, Robert Cummings [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: On Mon, 2007-11-12 at 11:27 +1100, Chris wrote: Frank Lopes wrote: I just started using PHP and got to think... Without getting into the discussion

Re: [PHP] functions versus includes

2007-11-11 Thread Nathan Nobbe
On Nov 11, 2007 11:52 PM, Chris [EMAIL PROTECTED] wrote: As I said, it's a micro-optimization *shrug*. 0.0004 seconds difference over 10 iterations - wow ;) actually it was just one iteration; the output isnt very clear, but thats the value of a variable. anyway, i was surprised to see the

Re: [PHP] functions versus includes

2007-11-11 Thread Chris
Nathan Nobbe wrote: On Nov 11, 2007 11:52 PM, Chris [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: As I said, it's a micro-optimization *shrug*. 0.0004 seconds difference over 10 iterations - wow ;) actually it was just one iteration; the output isnt very clear, but thats the

Re: [PHP] functions for sorting/paging functionality for imap mailboxes

2007-07-02 Thread Greg Donald
On 6/25/07, Yashesh Bhatia [EMAIL PROTECTED] wrote: i'm implementing an imap based mail client That's a major wheel to go reinventing, have you not tried IMP/Horde? http://www.horde.org/imp/ -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] functions classes

2006-08-26 Thread Alex Turner
Larry, I have hit similar global names space issues in the past and it is a pain in the behind! One remedial method that can get it stable enough to start to work on is to stick the whole messy lot into classes (NOT OBJECTS!) and then the global name space becomes the local namespace (ie

RE: [PHP] functions classes

2006-08-25 Thread Peter Lauri
It should not be to big of a problem if you can set your mind into thinking about functions and objects instead of a step by step script. Then just cut it in pieces and your are done :) -Original Message- From: Bigmark [mailto:[EMAIL PROTECTED] Sent: Friday, August 25, 2006 4:40 PM To:

Re: [PHP] functions classes

2006-08-25 Thread Dave Goodchild
On 25/08/06, Peter Lauri [EMAIL PROTECTED] wrote: It should not be to big of a problem if you can set your mind into thinking about functions and objects instead of a step by step script. Then just cut it in pieces and your are done :) Agreed. If it puts you on the good foot, send an extract

Re: [PHP] functions classes

2006-08-25 Thread Larry Garfield
On Friday 25 August 2006 04:39, Bigmark wrote: Can anyone tell me if it is relatively an easy process for an experienced coder (not me) to convert a php script to mainly functions/classes. I have my own script that i would like to make more streamlined as it is becoming very difficult to work

Re: [PHP] Functions

2006-08-14 Thread Richard Lynch
On Sun, August 13, 2006 8:45 pm, Gerry D wrote: On 6/30/06, Richard Lynch [EMAIL PROTECTED] wrote: #2. Don't alter the case of the input data, if at all possible. Accept what the user has given, and take it as it is. You can make your application not care about case, and you can format the

Re: [PHP] Functions

2006-08-13 Thread Gerry D
On 6/30/06, Richard Lynch [EMAIL PROTECTED] wrote: #2. Don't alter the case of the input data, if at all possible. Accept what the user has given, and take it as it is. You can make your application not care about case, and you can format the case on ouput (maybe even with fancy CSS stuff) but

Re: [PHP] Functions

2006-07-13 Thread Amit Arora
Hi, You might wanna try something like this: function cleaner($var) { $var = trim($var); $var = strip_tags($var); $var = ucfirst($var); $var = addslashes($var); // This line is not required $var = str_replace ($,,$var); return ($var) } And to actually use this function

Re: [PHP] Functions

2006-06-30 Thread [EMAIL PROTECTED]
I was able to get the return to work but not the pass in the reference. One last question, what if I want to have each item on a separate line like: function cleaner($var) { trim($var); strip_tags($var); ucfirst($var); addslashes($var); str_replace ($,,$var); } $var = abc's; echo $var; How

Re: [PHP] Functions

2006-06-30 Thread Richard Lynch
On Fri, June 30, 2006 12:00 am, [EMAIL PROTECTED] wrote: I am trying to create a function to clean up variables that are user inputted from a form. I am not getting this script to work. Can anyone help. ---Start Script--- function cleaner($var) {

Re: [PHP] Functions

2006-06-30 Thread Stut
[EMAIL PROTECTED] wrote: I was able to get the return to work but not the pass in the reference. One last question, what if I want to have each item on a separate line like: function cleaner($var) { trim($var); strip_tags($var); ucfirst($var); addslashes($var); str_replace ($,,$var); } $var

Re: [PHP] Functions

2006-06-29 Thread John Meyer
Two things: 1. You're not returning anything from the function. 2. You're not even using the function. [EMAIL PROTECTED] wrote: I am trying to create a function to clean up variables that are user inputted from a form. I am not getting this script to work. Can anyone help. ---Start

Re: [PHP] Functions

2006-06-29 Thread Chris
[EMAIL PROTECTED] wrote: I am trying to create a function to clean up variables that are user inputted from a form. I am not getting this script to work. Can anyone help. ---Start Script--- function cleaner($var) { trim(strip_tags(ucfirst(addslashes($var; } $var = abc's; echo $var;

Re: [PHP] functions that take variable arguments?

2005-12-05 Thread Richard Heyes
Eternity Records Webmaster wrote: how do you create/use a function that takes an undefined amount of arguments? I looked at the manual but its a little confusing. for example, i want to make a function called Update inside a DB class: class DB { //vars here var $host; var $DbUser; //functions

Re: [PHP] Functions Returning large strings

2005-09-29 Thread Andy Pieters
Hi I have a series of nested functions which return a large string (as apposed to working on global string) , is this inefficient? Or is PHP clever enough to just pass a pointer? $large_string=fn_one(fn_two(fn_three(; PHP is by no means cleaver enough to read your mind as to what you

Re: [PHP] functions vs classes

2005-04-04 Thread Brent Baisley
At the most basic level a class allows you to group your functions together. On small projects, grouping of functions may not seem to buy you anything. But the bigger the project gets, the more you would like to be able to keep your functions separated into groups. One simple advantage of

Re: [PHP] functions vs classes

2005-04-04 Thread Martin . C . Austin
Subject:Re: [PHP] functions vs classes At the most basic level a class allows you to group your functions together. On small projects, grouping of functions may not seem to buy you anything. But the bigger the project gets, the more you would like to be able to keep your functions

Re: [PHP] functions vs classes

2005-04-03 Thread Lars B. Jensen
Novice PHPer, and i am wondering why one would use a function instead of a class (or object)? They seem to server very similar in use. All depends on the specific use and situation - pros and cons by both models, for speed and performance, I mostly use optimized functions sorted out in

Re: [PHP] functions vs classes

2005-04-03 Thread Domas Juknevicius / DEFORM GROUP
Hello, Quite good and short answer to your question: http://answers.google.com/answers/threadview?id=207071 -- Domas Juknevicius DuSTiN KRySaK wrote: Novice PHPer, and i am wondering why one would use a function instead of a class (or object)? They seem to server very similar in use. The

RE: [PHP] functions and session variables

2004-02-18 Thread Vail, Warren
the $_SESSION array is available everywhere. I seem to be able to access it within a function without declaring it as a global. It is customary to declare globals that you intend to access in a function (almost everything undeclared is assumed to be local to the function). Other exceptions that

Re: [PHP] functions/methods and what they should return

2003-08-20 Thread Dan Anderson
You want to break off things into as many functions and components as possible. The idea is that if you want to change the way tables are displayed with the data, for instance, you can't break the way data is queried. I usually have a bunch of different files like inc.function.something.php and

Re: [PHP] functions/methods and what they should return

2003-08-20 Thread Ray Hunter
Each product that is in the database can have at least one attribute to it (i.e. color, size, etc.). Right now I've got a method in my Products class called ShowAttributes($id). This method, based on the ID passed to it, will query the db and ultimately return a string that makes up the drop

RE: [PHP] functions/methods and what they should return

2003-08-20 Thread Chris W. Parker
Dan Anderson mailto:[EMAIL PROTECTED] on Wednesday, August 20, 2003 3:04 PM said: You want to break off things into as many functions and components as possible. Hmm.. Ok. So right now I've got this (psuedo code): function displayAttributes($id) { // query db // store

RE: [PHP] functions/methods and what they should return

2003-08-20 Thread Dan Anderson
Hmm.. Although this sounds like a good idea at first, it seems like it would get pretty complicated really fast. Am I missing something? Well the idea is that on very large programs you create a number of different components that can be used and changed independently. To give you an

RE: [PHP] functions/methods and what they should return

2003-08-20 Thread Ray Hunter
function GetAttributes($id) { // query db // get records // return record array } function BuildAttributes($id) { $attributes = GetAttributes($id); // format $attributes // return HTML string } That is a good way...you have the functions

RE: [PHP] functions/methods and what they should return

2003-08-20 Thread Chris W. Parker
Dan and Ray, Thanks for your help. This helps clear some things up for me! Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] functions/methods and what they should return

2003-08-20 Thread Dan Anderson
While I'm still on my soapbox... There are a number of great books out there on object oriented programming. Basically the idea is to take a top down approach -- decide what components makes up what you want to do, what components make up those components, and so on until you can program

Re: [PHP] Functions in Safe Mode?

2003-08-04 Thread Jason Sheets
The problem is the owner of the script must be the owner of the file that you are accessing. If you fix your file ownership for your news directory or change your php script to be the same owner as the news directoryo you will be able to access the files. Look at the chown command,. you will

Re: [PHP] functions, opinion...

2003-06-17 Thread Jason Wong
On Tuesday 17 June 2003 12:50, DvDmanDT wrote: I was replying to If you don't do it this way, you'll find yourself re-writing a function sooner or later because you need it to return the data instead of displaying it Then you don't need to modify the function if you turn on ob, call

Re: [PHP] functions, opinion...

2003-06-17 Thread SLanger
Depends on the use of the function. (Output functions should produce output shouldn't they?!) Best option probably is to specifiy an argument that allows to choose wether to output or to return. If you return text you should return by reference to prevent unnecessary memory consumption.

Re: [PHP] functions, opinion...

2003-06-17 Thread Lars Torben Wilson
On Mon, 2003-06-16 at 23:20, Jason Wong wrote: On Tuesday 17 June 2003 12:50, DvDmanDT wrote: I was replying to If you don't do it this way, you'll find yourself re-writing a function sooner or later because you need it to return the data instead of displaying it Then you don't need to

RE: [PHP] functions, opinion...

2003-06-17 Thread Dan Joseph
Hi, My personal opinion, which shows in all my code writing is to never echo inside a function. always return the data whether it be string, array, or boolean... I've always left echoing up to the actual page showing the data. That way if you have two seperate pages that need to display

RE: [PHP] functions, opinion...

2003-06-17 Thread Dan Joseph
Hi, Depends on the use of the function. (Output functions should produce output shouldn't they?!) Best option probably is to specifiy an argument that allows to choose wether to output or to return. If you return text you should return by reference to prevent unnecessary memory consumption.

Re: [PHP] functions, opinion...

2003-06-17 Thread Hugh Bothwell
Dvdmandt [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Now, where did those two paragraphs come from? A bit of experience with all those langs and the BASIC school... I'm at the age of 14 and don't even know math yet so (I mean, I know +, -, / and *, but not advanced stuff)...

Re: [PHP] functions, opinion...

2003-06-16 Thread Rolf Brusletto
Dan - My personal opinion, which shows in all my code writing is to never echo inside a function. always return the data whether it be string, array, or boolean... I've always left echoing up to the actual page showing the data. That way if you have two seperate pages that need to display the

Re: [PHP] functions, opinion...

2003-06-16 Thread John W. Holmes
Rolf Brusletto wrote: Just kind of curious what people think. In your opinion, should a function avoid output? What I mean by that, is should a function on do something without having echo or printf commands in it? This is something I've been thinking about lately to improve my

Re: [PHP] functions, opinion...

2003-06-16 Thread DvDmanDT
Or you could just temporarily enable ob... That's what I do when I have a function that needs to return lots of HTML containing many ' and ... I know it's possible to use \ as well, but ob is somewhat easier then... John W. Holmes [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Rolf

Re: [PHP] functions, opinion...

2003-06-16 Thread Hugh Bothwell
Dvdmandt [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Or you could just temporarily enable ob... That's what I do when I have a function that needs to return lots of HTML containing many ' and ... I know it's possible to use \ as well, but ob is somewhat easier then... You're

Re: [PHP] functions, opinion...

2003-06-16 Thread Leif K-Brooks
Dan Joseph wrote: Hi, Just kind of curious what people think. In your opinion, should a function avoid output? What I mean by that, is should a function on do something without having echo or printf commands in it? This is something I've been thinking about lately to improve my

Re: [PHP] functions, opinion...

2003-06-16 Thread DvDmanDT
I was replying to If you don't do it this way, you'll find yourself re-writing a function sooner or later because you need it to return the data instead of displaying it Then you don't need to modify the function if you turn on ob, call function, then get contents, then clear ob... Ok, it's a

Re: [PHP] Functions and arguments

2003-01-29 Thread R0x0r Mc0wnage
What happens when you run this? Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/virtual/site125/fst/var/www/html/atracker/assignments/index.php on line 15 ID Number Name Created by Created on Due on Class Warning: mysql_fetch_array():

Re: [PHP] Functions and arguments

2003-01-29 Thread Matt
- Original Message - From: R0x0r Mc0wnage [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 29, 2003 8:49 PM Subject: Re: [PHP] Functions and arguments Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/virtual/site125/fst/var

Re: [PHP] Functions and arguments

2003-01-29 Thread Blaine von Roeder
What happens when you run this? I made some tweaks to the way I was running sessions, and now it works. I'm still getting an error unfortunately, but it's less conspicuous and spammy this time: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in

Re: [PHP] Functions and arguments

2003-01-28 Thread Jason Wong
On Wednesday 29 January 2003 13:31, Blaine von Roeder wrote: I'm working on the part of the site to parse your session for student id, check the students table for your class listing(named period1, period2, period3, etc), and then check the classes table based on the id numbers in your

RE: [PHP] FUNCTIONS

2002-08-19 Thread Jay Blanchard
[snip] i wrote a function do write a file for me on info taken from a db, and wrote a script with a for loop going through every row in the db, and calling the function. so the function is called about 200 times. but i'm getting weird results, the files are corrupted. its grand when i just go one

RE: [PHP] FUNCTIONS

2002-08-19 Thread MET
In the top of the loop, before you set the variables from the database do this. unset($variable); OR $variable = ; Either will do. ~ Matthew -Original Message- From: Georgie Casey [mailto:[EMAIL PROTECTED]] Sent: Monday, August 19, 2002 10:30 AM To: [EMAIL

Re: [PHP] FUNCTIONS

2002-08-19 Thread Georgie Casey
yea, but what about varibales in the actual function?? Met [EMAIL PROTECTED] wrote in message 003c01c2479f$ee948c40$6901a8c0@SURVIVAL">news:003c01c2479f$ee948c40$6901a8c0@SURVIVAL... In the top of the loop, before you set the variables from the database do this. unset($variable); OR

Re: [PHP] FUNCTIONS

2002-08-19 Thread Georgie Casey
its supposed to write a MIDI file from some music notes, the start of the MIDI file is grand but the end has some of the MIDI from the next database record! Jay Blanchard [EMAIL PROTECTED] wrote in message

Re: [PHP] FUNCTIONS

2002-08-19 Thread Jason Wong
On Monday 19 August 2002 22:51, Georgie Casey wrote: its supposed to write a MIDI file from some music notes, the start of the MIDI file is grand but the end has some of the MIDI from the next database record! Instead of keeping us guessing and indulging in idle speculation as to what your

[PHP] Re: PHP Functions Essential Reference??

2002-07-18 Thread Richard Lynch
does anyone have a copy of the electronic version (free, i believe?) of the book PHP Functions Essential Reference ? the website http://www.php-er.com has been down and i am trying to locate it... http://php.net ? :-) Given the price of the book, just buy a paper copy :-) -- Like Music?

Re: [PHP] Functions list

2002-07-09 Thread David Otton
On Tue, 9 Jul 2002 15:05:21 -0300, you wrote: I have the PHP manual in my PDA but its extraordinary large to search for a function. Does anybody know a Functions list that I can download for my PDA? I’m looking for something which shows the function and a short description of what it works for.

RE: [PHP] functions

2002-04-12 Thread Caspar Kennerdale
function firstfunction(){ code; code; code; secondfunction(); } -Original Message- From: Alia Mikati [mailto:[EMAIL PROTECTED]] Sent: 12 April 2002 06:38 To: [EMAIL PROTECTED] Subject: [PHP] functions hi i would like now how can we call a function within another function in php?

RE: [PHP] functions

2002-04-12 Thread Jon Haworth
Hi Alia, i would like now how can we call a function within another function in php? The same way you'd call it from outside a function :-) ?php function hello () { echo hello ; } function world () { hello (); echo world; } hello(); echo br; world(); ? ...should output hello

Re: [PHP] functions

2002-04-12 Thread Andrey Hristov
?php function say_hello(){ print Hello; } function welcome() { say_hello(); } welcome(); ? HTH Regards, Andrey Hristov - Original Message - From: Alia Mikati [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 12, 2002 4:37 PM Subject: [PHP] functions hi i would like now

RE: [PHP] Functions

2002-02-13 Thread Daniel Kushner
http://www.php.net/manual/en/language.variables.predefined.php http://www.php.net/manual/en/funcref.php -Original Message- From: Jason Whitaker [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 4:15 PM To: [EMAIL PROTECTED] Subject: [PHP] Functions Is there a

RE: [PHP] Functions

2002-02-13 Thread Narvaez, Teresa
Try the phpinfo() function: Example: htmlheadtitlePHP Test/title/head body ?php phpinfo()? /body/html -Teresa -Original Message- From: Jason Whitaker [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 4:15 PM To: [EMAIL PROTECTED] Subject: [PHP] Functions Is there a

RE: [PHP] functions...

2002-01-09 Thread Robert V. Zwink
More about this here: http://www.php.net/manual/en/function.func-get-arg.php Robert Zwink http://www.zwink.net/daid.php -Original Message- From: Chris Hall [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 08, 2002 9:48 PM To: [EMAIL PROTECTED] Subject: [PHP] functions... function

RE: [PHP] functions...

2002-01-08 Thread Martin Towell
it's possible to pass a variable number of parameters to a function $num = func_num_args(); for ($i = 1; $i $num; $i++) { $arg = func_get_arg($i); } try looking at these... -Original Message- From: Chris Hall [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002

RE: [PHP] functions returning arrays II

2001-08-27 Thread Robert V. Zwink
The line: echo $r[ $i ]; does not need quotation marks. You should change it to: echo $r[ $i ]; I removed the quotation marks and your script ran fine on my server. If this doesn't help post more information. Robert Zwink http://www.zwink.net/daid.net -Original

Re: [PHP] functions?

2001-07-06 Thread rick
instead of returning that line, put it into some variable... like: while ($row = mysql_fetch_row ($result)) { $map_list .= a href='viewonly.php3?mapid=$row[1]'$row[0]/abr; } } return $map_list; - Original Message - From: [EMAIL PROTECTED] To: 'Php-General (E-Mail) [EMAIL PROTECTED]

Re: [PHP] functions?

2001-07-06 Thread [EMAIL PROTECTED]
on 7/6/01 11:36 AM, rick at [EMAIL PROTECTED] wrote: while ($row = mysql_fetch_row ($result)) { $map_list .= a href='viewonly.php3?mapid=$row[1]'$row[0]/abr; } } return $map_list; Thanks Rick! This worked great. I guess I'm right in assuming that all you can get back from a function is

Re: [PHP] Functions.

2001-04-24 Thread Matt McClanahan
On Tue, Apr 24, 2001 at 03:06:40PM +0200, Anders Clerwall wrote: Hi, Is there a tutorial of some sort on how I add function sets to PHP4? I've searched the net for more info about this other than what the PHP4.x manual says, and I saw some reference to freshmeat, but I couldn't find that.

Re: [PHP] functions????

2001-01-27 Thread Nick Winfield
On Sun, 28 Jan 2001, Kumanan wrote: Hi, i got problem with functions when i call the files with url//filename.php?action=pal all the time it says Fatal error: Call to unsupported or undefined function pal_edit() in /cfiles/memberlink.php on line 7 Declare your functions

RE: [PHP] functions????

2001-01-27 Thread Joe Sheble (Wizaerd)
your function declarations must appear before you actually call them. code ... ? function pf() { echo "profile"; } function pal_edit() { echo "pal"; } switch ($action) { case "pf": profile(); break; case "pal": pal_edit();

Re: [PHP] functions????

2001-01-27 Thread Kumanan
o thanks kumanan "Nick Winfield" [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Sun, 28 Jan 2001, Kumanan wrote: Hi, i got problem with functions when i call the files with url//filename.php?action=pal all the time it says

Re: [PHP] Functions

2001-01-17 Thread Toby Butzon
echo foo(dog);// outputs "This is a dog" This is an example of using a "bareword" - PHP doesn't recognize _dog_ as any sort of reserved word or constant, so it sends it like a quoted string. I don't recommend using this because it's ambiguous whether you mean "dog" or if _dog_ is a

RE: [PHP] Functions

2001-01-10 Thread Emil Rasmussen
Hi not the () after the function name function ShowMessage() { echo "Show message...\n"; } How can I call the function now? echo ShowMessage(); :: Emil --- Emil Rasmussen http://www.noget.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] Functions

2001-01-10 Thread Marcelo Gulin
Hi! ShowMessage(); regards Marcelo Gulin Augusto Cesar Castoldi escribi: How do I use a function? I did: function ShowMessage { echo "Show message...\n"; } How can I call the function now? thanks, Augusto Cesar Castoldi -- PHP General Mailing List