Re: [PHP] Function source?

2002-07-11 Thread Richard Lynch
No, they are written in C. And yes, you can of course download the C source code from php.net. If you are interested in a particular PHP function, there's even a really nice interface at http://cvs.php.net that lets you look at it without downloading the whole darn thing. VERY nice. You don't

Re: [PHP] Function source?

2002-07-09 Thread Rasmus Lerdorf
No, they are written in C. And yes, you can of course download the C source code from php.net. -Rasmus On Tue, 9 Jul 2002, Leif K-Brooks wrote: If I understand correctly, all php functions are written in php. If this is true, is it possible to view function source code? Thanks for any

Re: [PHP] Function source?

2002-07-09 Thread Pushkar Pradhan
When you compile from the source (which is in c) the functions that are available are actually c executables. If I understand correctly, all php functions are written in php. If this is true, is it possible to view function source code? Thanks for any insight into this :-) -- PHP General

Re: [PHP] Function source?

2002-07-09 Thread Anas Mughal
As Rasmus said, all functions are in C. PHP is open source: The source code is available to the public. --- Leif K-Brooks [EMAIL PROTECTED] wrote: If I understand correctly, all php functions are written in php. If this is true, is it possible to view function source code? Thanks for

Re: [PHP] function for size of array

2002-07-05 Thread Terence Kearns
cout($array) Scott Fletcher wrote: Is there PHP function that would get the total array count. ie --snip-- $array[0] = zero; $array[1] = one; $array[2] = two; $array_count = function to get the array count --snip-- And I would get 3 as an answer. Thanks, FletchSOD -- PHP

Re: [PHP] function for size of array

2002-07-05 Thread Terence Kearns
count($array); Scott Fletcher wrote: Is there PHP function that would get the total array count. ie --snip-- $array[0] = zero; $array[1] = one; $array[2] = two; $array_count = function to get the array count --snip-- And I would get 3 as an answer. Thanks, FletchSOD -- PHP

Re: [PHP] function for size of array

2002-07-05 Thread Scott Fletcher
Ah! Thanks! By the way, it's count() with a n. :-) Terence Kearns [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... cout($array) Scott Fletcher wrote: Is there PHP function that would get the total array count. ie --snip-- $array[0] = zero; $array[1] =

Re: [PHP] function for size of array

2002-07-05 Thread Terence Kearns
Scott Fletcher wrote: Is there PHP function that would get the total array count. ie --snip-- $array[0] = zero; $array[1] = one; $array[2] = two; $array_count = function to get the array count --snip-- And I would get 3 as an answer. Thanks, FletchSOD count($array); -- PHP

RE: [PHP] function for size of array

2002-07-05 Thread Cal Evans
size_of() (insert obligatory RTFM comment here) =C= * * Cal Evans * The Virtual CIO * http://www.calevans.com * -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED]] Sent: Friday, July 05, 2002 9:16 AM To: [EMAIL PROTECTED] Subject: [PHP] function for size of array Is

Re: [PHP] function for size of array

2002-07-05 Thread Jason Wong
On Friday 05 July 2002 22:20, Scott Fletcher wrote: Ah! Thanks! By the way, it's count() with a n. :-) That was to trick you into RTFM! Hey you were lucky that the 'o' wasn't left out instead :) -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems

Re: [PHP] function for size of array

2002-07-05 Thread Neil Freeman
LOL - nice one Jason :) Jason Wong wrote: ** This Message Was Virus Checked With : SAVI 3.59 May 2002 Last Updated 3rd July 2002 ** On Friday 05

Re: [PHP] function for size of array

2002-07-05 Thread Scott Fletcher
What is RTFM?? Jason Wong [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Friday 05 July 2002 22:20, Scott Fletcher wrote: Ah! Thanks! By the way, it's count() with a n. :-) That was to trick you into RTFM! Hey you were lucky that the 'o' wasn't left

Re: [PHP] function for size of array

2002-07-05 Thread Philip Olson
It's a term with many different meanings. See: http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?RTFM On Fri, 5 Jul 2002, Scott Fletcher wrote: What is RTFM?? Jason Wong [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Friday 05 July 2002 22:20, Scott

Re: [PHP] function for size of array

2002-07-05 Thread Kondwani Spike Mkandawire
Neat!... Philip Olson [EMAIL PROTECTED] wrote in message Pine.BSF.4.10.10207051644510.68593-10@localhost">news:Pine.BSF.4.10.10207051644510.68593-10@localhost... It's a term with many different meanings. See: http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?RTFM On Fri, 5 Jul 2002,

Re: [PHP] function for size of array

2002-07-05 Thread Larry Rosenman
On Fri, 2002-07-05 at 11:45, Scott Fletcher wrote: What is RTFM?? Read The Fine Manual Jason Wong [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Friday 05 July 2002 22:20, Scott Fletcher wrote: Ah! Thanks! By the way, it's count() with a n. :-)

RE: [PHP] function echo ' '

2002-06-25 Thread Matthew Nock
my understanding is that you could write it like this: ? echo 'a href='.$address.''; ? -Original Message- From: Martin Johansson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 25 June 2002 5:25 PM To: [EMAIL PROTECTED] Subject: [PHP] function echo ' ' Is there a way to express php

Re: [PHP] function echo ' '

2002-06-25 Thread René Moonen
Use the escape character to output double quotes echo 'a href=\$address\'; René Martin Johansson wrote: Is there a way to express php variables inside an echo ' '. I want something like this to work: echo 'a href=$address'; I know I can write it like this: echo 'a href='; echo $address;

Re: [PHP] function echo ' '

2002-06-25 Thread PHPCoder
Yes, just use instead of '. Using ' causes the contents to be treated as literal strings, and the $ is therefore not treated as a $. Just do: echo a href=\$address\; Martin Johansson wrote: Is there a way to express php variables inside an echo ' '. I want something like this to work:

Re: [PHP] function echo ' '

2002-06-25 Thread Craig
Can you use a href=? echo $address; ? or is this bad coding? René moonen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Use the escape character to output double quotes echo 'a href=\$address\'; René Martin Johansson wrote: Is there a way to express

RE: [PHP] function echo ' '

2002-06-25 Thread Niklas Lampén
2002 10:43 To: [EMAIL PROTECTED] Subject: Re: [PHP] function echo ' ' Can you use a href=? echo $address; ? or is this bad coding? René moonen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Use the escape character to output double quotes echo 'a href=\

Re: [PHP] function echo ' '

2002-06-25 Thread Martin Johansson
But the problem is that Im doin it inside a while loop. So I need to echo it. /mj Niklas lampén [EMAIL PROTECTED] skrev i meddelandet 025801c21c1d$55d16210$ba93c5c3@Niklas">news:025801c21c1d$55d16210$ba93c5c3@Niklas... Shorter version would be a href=?=$address? And this is not bad coding, it

Re: [PHP] function echo '

2002-06-25 Thread Pradeep Dsouza
Yes you can a href = link.php??php echo module=1; ? Link Here /a Pradeep Can you use a href=? echo $address; ? or is this bad coding? René moonen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Use the escape character to output double quotes echo 'a

RE: [PHP] function echo ' '

2002-06-25 Thread Niklas Lampén
PROTECTED] Subject: Re: [PHP] function echo ' ' But the problem is that Im doin it inside a while loop. So I need to echo it. /mj Niklas lampén [EMAIL PROTECTED] skrev i meddelandet 025801c21c1d$55d16210$ba93c5c3@Niklas">news:025801c21c1d$55d16210$ba93c5c3@Niklas... Shorter version would be

Re: [PHP] function echo ' '

2002-06-25 Thread Martin Johansson
? a href=page?=$i?.htmPage ?=$i?/a ? }; ? Niklas -Original Message- From: Martin Johansson [mailto:[EMAIL PROTECTED]] Sent: 25. kesäkuuta 2002 10:56 To: [EMAIL PROTECTED] Subject: Re: [PHP] function echo ' ' But the problem is that Im doin it inside a while loop. So I need to echo

Re: [PHP] function echo ' '

2002-06-25 Thread Martin Johansson
Thanks all for your replies! For my code, this is the best way to view variables in echo functions ? echo 'a href='.$address.''; ? It is nice and easy to read while going through a lot of code. /mj -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] function definition causing problems?

2002-06-24 Thread Johnson, Kirk
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\inetpub\wwwroot\PHP\cat_proto3.php on line 46 Line 46 corresponds to the form tag, as follows: FORM ACTION=?php echo $_SERVER['PHP_SELF'] ? method=POST When you echo out

Re: [PHP] function definition causing problems?

2002-06-24 Thread Erik Price
On Monday, June 24, 2002, at 12:15 PM, Johnson, Kirk wrote: When you echo out an array element, the name needs to be enclosed in curlies, e.g., echo {$_SERVER['PHP_SELF']} I think that this is only important when using an associative array element reference within certain kinds of

Re: [PHP] function definition causing problems?

2002-06-24 Thread Rasmus Lerdorf
// this won't work b/c of quoting issues echo This script is called $_SERVER[PHP_SELF]; // this should work fine IIRC echo This script is called $_SERVER['PHP_SELF']; Nope, use: echo This script is called $_SERVER[PHP_SELF]; -Rasmus -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] function definition causing problems?

2002-06-24 Thread Ford, Mike [LSS]
-Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: 24 June 2002 18:12 On Monday, June 24, 2002, at 12:15 PM, Johnson, Kirk wrote: When you echo out an array element, the name needs to be enclosed in curlies, e.g., echo {$_SERVER['PHP_SELF']} I think

RE: [PHP] function definition causing problems?

2002-06-24 Thread Johnson, Kirk
I thought this syntax, an unquoted key name, was deprecated ;) From the manual at http://www.php.net/manual/en/language.types.array.php: You should always use quotes around an associative array index. Kirk Nope, use: echo This script is called $_SERVER[PHP_SELF]; -- PHP General Mailing

RE: [PHP] function definition causing problems?

2002-06-24 Thread Rasmus Lerdorf
Not inside a quoted string. On Mon, 24 Jun 2002, Johnson, Kirk wrote: I thought this syntax, an unquoted key name, was deprecated ;) From the manual at http://www.php.net/manual/en/language.types.array.php: You should always use quotes around an associative array index. Kirk Nope,

Re: [PHP] function definition causing problems?

2002-06-24 Thread Erik Price
On Monday, June 24, 2002, at 01:30 PM, Ford, Mike [LSS] wrote: You can use: echo This script is called {$_SERVER['PHP_SELF']}; echo This script is called ${_SERVER['PHP_SELF']}; echo This script is called $_SERVER[PHP_SELF]; or even echo This script is called .

Re: [PHP] function return

2002-05-28 Thread RIVES Sergio
Hi, I don't know if there is an easier way to do this but why don't you concatenate the two values to be returned and then split the returned value ? ex : function myFunction($some_vars) { $max=count($some_vars); $some_value=($max/2); $result = $some_value.;.$max; return $result; } $resultado

RE: [PHP] function return

2002-05-28 Thread David Freeman
I have a Q about functions. My function should return 2 values. What syntax should I use and how do I call these values outside the function? Are these values returned as en array or something? I don't know if there is an easier way to do this but why don't you concatenate the

RE: [PHP] function return

2002-05-28 Thread Rudolf Visagie
Hi, function myFunction($some_vars, $max, $some_value) { $max=count($some_vars); $some_value=($max/2); //return true; } Rudolf Visagie Principal Software Developer Digital Healthcare Solutions mailto:[EMAIL PROTECTED] Tel: + 27 011 2655478 Cell: + 27 82 895 1598 -Original Message-

Re: [PHP] function return

2002-05-28 Thread 1LT John W. Holmes
Return an array function whatever($var1, $var2) { // do whatever $ret[0] = $var1 + $var2; $ret[1] = $var1 - $var2; $ret['something'] = ($var1/$var2) * 100; return $ret; } $value = whatever(5,4); echo $value[0]; echo $value['something']; ---John Holmes... - Original Message

Re: [PHP] function return

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, W. Enserink wrote: I have a Q about functions. My function should return 2 values. What syntax should I use and how do I call these values outside the function? Are these values returned as en array or something? this is what I have now, -

RE: [PHP] Function Switch($pid) - NEED HELP

2002-05-25 Thread Jonathan Rosenberg
-Original Message- From: Vincent Kruger [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 25, 2002 8:41 AM To: [EMAIL PROTECTED] Subject: [PHP] Function Switch($pid) - NEED HELP I have a script that switches. switch($pid) { case 1: break; case 2: break; } Now

Re: [PHP] Function Switch($pid) - NEED HELP

2002-05-25 Thread Rasmus Lerdorf
Just don't do the break in case 1 if you want to fall through to case 2. On Sat, 25 May 2002, Vincent Kruger wrote: I have a script that switches. switch($pid) { case 1: break; case 2: break; } Now I'm doing a check in case 1 and if everything goes well, i want to

RE: [PHP] Function Switch($pid) - NEED HELP

2002-05-25 Thread David Freeman
I have a script that switches. switch($pid) { case 1: break; case 2: break; } Now I'm doing a check in case 1 and if everything goes well, i want to switch directly to case 2 while the script is runny. How would i do that ??? In the specific case

RE: [PHP] Function

2002-05-21 Thread Peter
write the function as normal in na.inc and then on the page that u want to use that function type include(path_to_na.inc); -Original Message- From: Rodrigo [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 22 May 2002 1:48 PM To: 'Php Lista' Subject: [PHP] Function Hi guys I’m trying to use

Re: [PHP] Function

2002-05-21 Thread Sqlcoders.com Programming Dept
Hi there!, When you include information from an include file, PHP treats the text as inline code if you use the include() function. In other words, if you use code like this: ?php include 'file.php'; ? Then any functions inside file.php will be available just as if you'd copy/pasted them in.

Re: [PHP] Function

2002-05-21 Thread Kevin Waterson
On Wed, 22 May 2002 00:48:24 -0300 Rodrigo [EMAIL PROTECTED] wrote: Hi guys I_m trying to use a function on na .inc file, how should I do? How should I write the function and what should I write on the file so that the function file is _Included_ to be used on a function call on the php

Re: [PHP] Function

2002-05-21 Thread Miguel Cruz
On Wed, 22 May 2002, Sqlcoders.com Programming Dept wrote: When you include information from an include file, PHP treats the text as inline code if you use the include() function. In other words, if you use code like this: ?php include 'file.php'; ? Then any functions inside file.php

RE: [PHP] function over loading?

2002-05-06 Thread Insomniac Admin
We did actually hear you the first time, but I'll just assume your not all that bright. As far as Im aware you cannot over load functions in php - although there may be some new functions available ... I suggest you check the manual. -Original Message- From: Kris Vose [mailto:[EMAIL

RE: [PHP] function sql question

2002-05-05 Thread John Holmes
return 1; return $city_id; return $cityname; You can't return 3 values...try returning an array, instead. $ret[0] = $city_id; $ret[1] = $cityname; return $ret; or... $ret[City_ID] = $city_id; $ret[CityName] = $cityname; return $ret; ---John Holmes... -- PHP General Mailing

Re: [PHP] function sql question

2002-05-05 Thread John Fishworld
duh ! yeah that makes sense ! but it doesn't work ! I've no idea why but it refuses to give any information back ! I've managed to get round this by now no loger declaring it a function but just actually requiring it where i need it require (get_city_1.inc); print_r(array_values ($city)); I've

RE: [PHP] function sql question

2002-05-05 Thread John Holmes
It will work; you're just doing something wrong. Do you want to fix it, or keep doing it this way? ---John Holmes... -Original Message- From: John Fishworld [mailto:[EMAIL PROTECTED]] Sent: Sunday, May 05, 2002 10:55 AM To: [EMAIL PROTECTED]; 'PHP-General' Subject: Re: [PHP

Re: [PHP] function sql question

2002-05-05 Thread Richard Archer
At 6:34 PM +0200 5/5/02, John Fishworld wrote: John, Your mysql_db_query should contain either DBWEB (with quotes) or $DBWEB (a var). Just DBWEB is an error. Also, from the manual re: mysql_db_query Note: This function has been deprecated since PHP 4.0.6. Do not use this function. Use

Re: [PHP] function not returning value

2002-04-30 Thread Evan Nemerson
http://www.php.net/manual/en/language.variables.scope.php On Tuesday 30 April 2002 19:09 pm, you wrote: Why would the following function not return a value: (both $lastname and $firstname are defined) function get_handle($lastname, $firstname) { $handle_guess=$lastname;

Re: [PHP] function returning true or errors

2002-04-18 Thread Jason Wong
On Thursday 18 April 2002 23:25, Erik Price wrote: I am writing a function that performs some actions. I would like to return true if the actions succeed, or return an error message if the actions fail. How should I go about it? The following code doesn't do it, because the returned error

RE: [PHP] function returning true or errors

2002-04-18 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Rather than using true and false you can use 1, 0 it saves key strokes, reduces script size, etc Also use ' instead of if you don't need it evaluated by PHP. if (custom_function) { print 'Custom Function succeeded!'; } else { print 'There was a problem!'; } One thing I've

Re: [PHP] function returning true or errors

2002-04-18 Thread Erik Price
On Thursday, April 18, 2002, at 11:56 AM, Jason Wong wrote: What I tend to do is define functions like so: function doo($dah, $dib, $error) { ... I had not even thought about passing an extra parameter by reference -- great idea. Erik Erik Price Web Developer Temp Media

Re: [PHP] Function stored in a database

2002-04-09 Thread Miguel Cruz
On Tue, 9 Apr 2002, Anzak Wolf wrote: I have a question about storing functions. I have some security mode stuff I'm working on and what I'm thinking is that as part of the security mode table I would store a function that could be called if the security mode is called. Something like

Re: [PHP] Function stored in a database

2002-04-09 Thread Robert Cummings
Anzak Wolf wrote: I have a question about storing functions. I have some security mode stuff I'm working on and what I'm thinking is that as part of the security mode table I would store a function that could be called if the security mode is called. Something like this. Select

RE: [PHP] Function that escapes special caracters from regular expressions

2002-04-07 Thread Matt Friedman
http://www.php.net/manual/en/function.preg-quote.php Found this in the manual in about 3 secs. Try to check the manual first before posting. ;-) Matt Friedman Web Applications Developer www.SpryNewMedia.com -Original Message- From: Leif K-Brooks [mailto:[EMAIL PROTECTED]] Sent:

Re: [PHP] function that extracts numbers from a string

2002-02-22 Thread Andrey Hristov
Try with preg_match_all() PCRE functions are up to 25% faster than POSIX(ereg). Best regards, Andrey Hristov - Original Message - From: DigitalKoala [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 22, 2002 1:44 PM Subject: [PHP] function that extracts numbers from a

Re: [PHP] function not returning TRUE

2002-02-12 Thread Erik Price
On Tuesday, February 12, 2002, at 11:24 AM, Nick Wilson wrote: Hi all Can anyone see any reason why this function does not appear to be returning true? It appears to be returning 1 though? [snip snip] if(!$this-_db_connect()) { return FALSE; }

Re: [PHP] function not returning TRUE

2002-02-12 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Erik Price declared Hm. I can't answer your question, but I'd like to ask you one. I've been using 'return 1' or 'return 0' in my function calls -- is there an advantage to using 'TRUE' or 'FALSE' rather than numbers? In other

Re: [PHP] function to post data

2002-02-07 Thread Erik Price
On Wednesday, February 6, 2002, at 11:06 PM, Lars Torben Wilson wrote: On Wed, 2002-02-06 at 19:32, obo wrote: is there a command in php to post form data to a script? example: i have a form. once the submit is hit i use php to check the values. if the values are ok i then call a

Re: [PHP] function to post data

2002-02-07 Thread Jason Wong
On Thursday 07 February 2002 22:45, Erik Price wrote: I don't mean to butt in here, I'm just a bit confused. I thought that the poster (obo) was asking how to submit form variables using POST. For the purpose of doing more work with these variables, from a (PHP) script. Is obo asking

Re: [PHP] function to post data

2002-02-06 Thread val petruchek
PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, February 07, 2002 6:06 AM Subject: Re: [PHP] function to post data On Wed, 2002-02-06 at 19:32, obo wrote: is there a command in php to post form data to a script? example: i have a form. once the submit is hit i use php to check

Re: [PHP] Function call stack

2002-01-30 Thread Lars Torben Wilson
On Wed, 2002-01-30 at 03:33, Christian Novak wrote: Has anyone an idea on how to get information from PHP on the function call stack. I need the line number and file calling a function for a custom error handler. This cannot be done in current versions of PHP. There are feature requests in

Re: [PHP] Function call stack

2002-01-30 Thread Stefan Rusterholz
[EMAIL PROTECTED] To: Christian Novak [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 12:45 PM Subject: Re: [PHP] Function call stack On Wed, 2002-01-30 at 03:33, Christian Novak wrote: Has anyone an idea on how to get information from PHP on the function call stack

Re: [PHP] function trouble: pass by referrence

2002-01-21 Thread Jim Lucas [php]
where ever you are going to referance $HTTP_POST_VARS use $GLOBALS[HTTP_POST_VARS] and then use that inside your function. function myFunc() { foreach($GLOBALS[HTTP_POST_VARS] AS $k = $i) { $GLOBALS[HTTP_POST_VARS][$k] = stripslashes($i); $GLOBALS[HTTP_POST_VARS][$k] =

Re: [PHP] function arguments

2002-01-18 Thread Ben Sinclair
You can do something like this: function myFunction($a = hello, $b = world) { } Both arguments are optional and have default values. This is in the documentation. -- Ben Sinclair [EMAIL PROTECTED] - Original Message - From: Malte Fucks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent:

Re: [PHP] function arguments

2002-01-18 Thread mike cullerton
expanding on this... function func($arga, $argb, $argc='') { do_something_with_arga($arga); do_another_thing_with_argb($argb); if ($argc != '') do_somthing_with_argc($argc); } on 1/18/02 1:19 PM, Ben Sinclair at [EMAIL PROTECTED] wrote: You can do something like this: function

Re: [PHP] Function definition: how to make default argument an empty array?

2001-12-22 Thread Bogdan Stancescu
Can't test it now, but have you tried function makeyogurt ($flavour, $type = list()) I assume you need it to be an array because you want to either walk it or, more likely, perform an in_array() test on it and you found that passing non-array variables to in_array issues an error. If

Re: [PHP] Function definition: how to make default argument an empty array?

2001-12-22 Thread Michael Sims
At 01:17 PM 12/22/2001 +0100, Michael Jurgens wrote: I'm now looking for a way to have the second (optional) argument be an array of strings. I can't get it to work though... In pseudo-code: function makeyogurt ($flavour, $type = 'EMPTY ARRAY') { } Does this work? function makeyogurt

Re: [PHP] Function definition: how to make default argument an emptyarray?

2001-12-22 Thread Philip Olson
In pseudo-code: function makeyogurt ($flavour, $type = 'EMPTY ARRAY') { } function makeyogurt ($flavour, $type = array()) { ... } or function makeyogurt ($flavour, $type = array('a','b')) { ... } regards, Philip Olson -- PHP General Mailing List

Re: [PHP] Function Alias: mysql()

2001-12-06 Thread Tyler Longren
Are you sure that isn't a custom function in your code (assuming you're using somebody else's code)? It could be an alias to: mysql_db_query() It has the same handlers, ex: $rez=mysql_db_query($dbname,$query); Tyler Longren - Original Message - From: Dennis Moore [EMAIL PROTECTED] To:

Re: [PHP] Function Alias: mysql()

2001-12-06 Thread Dennis Moore
: Re: [PHP] Function Alias: mysql() Are you sure that isn't a custom function in your code (assuming you're using somebody else's code)? It could be an alias to: mysql_db_query() It has the same handlers, ex: $rez=mysql_db_query($dbname,$query); Tyler Longren - Original Message

Re: [PHP] Function not found

2001-10-29 Thread David Robley
On Mon, 29 Oct 2001 21:19, De Necker Henri wrote: Where can i find the code for the array_search() function in php4.I do have php4 but the function isnt found.The in_array() function is found. According to the docs, that wasn't introduced unntil 4.05, so if you have an earlier version you

Re: [PHP] function names

2001-10-25 Thread Steve Cayford
On Thursday, October 25, 2001, at 02:08 PM, Martín Marqués wrote: On Jue 25 Oct 2001 15:36, you wrote: Hello php-general, I have such code: class A { var $xxx; function print() { echo $xxx; $xxx is internal to the print function.

RE: [PHP] Function to Build Trees

2001-08-21 Thread Chris Hayes
Antwoord naar: [EMAIL PROTECTED] Van:Dan Harrington [EMAIL PROTECTED] Onderwerp: RE: [PHP] Function to Build Trees Or you could just buy from http://www.plumbdesign.com/ or write a PHP SDK for them. :-) sorry? what does that horrible coldfusion

Re: [PHP] Function to Build Trees

2001-08-20 Thread Chris Hayes
Onderwerp:[PHP] Function to Build Trees A most interesting question! Given a multidimensional array with words as keys, I want to match the values of each array with the keys of the array and build a new array that reflects these relationships as a sort of tree. So, in

RE: [PHP] Function to Build Trees

2001-08-20 Thread Dan Harrington
Or you could just buy from http://www.plumbdesign.com/ or write a PHP SDK for them. :-) -Original Message- From: Chris Hayes [mailto:[EMAIL PROTECTED]] Sent: Monday, August 20, 2001 4:15 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Function to Build Trees Onderwerp

Re: [PHP] function into string

2001-08-07 Thread Tom Carter
Try readin the manual before posting.. all you want is the string concatenation operator . PHP is weakly typed so no direct conversion is needed echo balalala . trim(odbc_result($result_id,3)) . aasasasas Sorry for the dummies question, but how do I insert into string like: echo balalala

Re: [PHP] function into string

2001-08-07 Thread Renze Munnik
On Tue, Aug 07, 2001 at 02:30:31PM +0200, Veniamin Goldin wrote: Sorry for the dummies question, but how do I insert into string like: echo balalala how to insert function in the midle like : echo balalala [trim(odbc_result($result_id,3))] aasasasas Thank you. How about: echo

RE: [PHP] function that will print the url for embedded links

2001-08-01 Thread Dave
you would have to pass a page identifier when its the printer friendly page, then just parse for it. quoting your paragraph... - ...on a dynamically created webpage, I have a link called: ?PHP if($page=='Printer Friendly'){ # this is

RE: [PHP] Function call from a hyperlink

2001-07-11 Thread Shrout, Ryan
Why not just pass a variable: a href=file.php?function and then in the PHP file do: if ($function) { function(); } Ryan Shrout Amdmb.com -Original Message- From: Geer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 1:17 PM To: [EMAIL PROTECTED] Subject: [PHP]

RE: [PHP] Function call from a hyperlink

2001-07-11 Thread scott [gts]
you can't. you have to write handler code to read in the information being passed to the script and properly execute a function. (if anyone could arbitrarily execute any function they wanted just by passing in the function name, havoc would be wreaked on PHP programs everywhere :)

RE: [PHP] Function call from a hyperlink

2001-07-11 Thread Chadwick, Russell
that. -Original Message- From: Shrout, Ryan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 10:16 AM To: 'Geer'; [EMAIL PROTECTED] Subject: RE: [PHP] Function call from a hyperlink Why not just pass a variable: a href=file.php?function and then in the PHP file do: if ($function

RE: [PHP] Function call from a hyperlink

2001-07-11 Thread scott [gts]
design... -Original Message- From: Chadwick, Russell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 1:21 PM To: '[EMAIL PROTECTED]' Subject: RE: [PHP] Function call from a hyperlink another way is to do eval () on $function but that kinda stuff is really bad

RE: [PHP] Function Reqest/Question

2001-07-03 Thread Brian White
Personally, I kind of like: switch(1){ default: // BREAK BLOCK START blah blah blah... // Want to get out of here... break; } // BREAK BLOCK END It's a little more cumbersome than the while construct, but it is absolutely guaranteed to only go through once, whilst the while

RE: [PHP] Function Reqest/Question

2001-07-02 Thread scott [gts]
i dont know of a function to skip to the end of the nearest ?, and i suspect that there isn't one... you can use other control func's to do what you need, in the context that you're working in... read up on: goto, break, continue, return -Original Message- From: Anil [mailto:[EMAIL

RE: [PHP] Function Reqest/Question

2001-07-02 Thread Matthew Loff
[gts] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 3:33 PM To: php Subject: RE: [PHP] Function Reqest/Question i dont know of a function to skip to the end of the nearest ?, and i suspect that there isn't one... you can use other control func's to do what you need, in the context

Re: [PHP] Function No Longer works

2001-06-30 Thread Hugh Bothwell
Look for 'allow_url_fopen' in your config file. Black S. [EMAIL PROTECTED] wrote in message 9hi6hi$2s9$[EMAIL PROTECTED]">news:9hi6hi$2s9$[EMAIL PROTECTED]... I have found the problem with my previous post and PHP functions no longer working. It seems the code:

Re: [PHP] Function

2001-06-29 Thread Delbono
you can use array_walk array_walk (PHP 3= 3.0.3, PHP 4 = 4.0b1) array_walk -- Apply a user function to every member of an array Description int array_walk (array arr, string func, mixed userdata) - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc:

Re: [PHP] function to determine caller

2001-06-26 Thread elias
There has been a discussion similar to this. But unfortunately PHP doesn't have such feature. Morgan Curley [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is there any statement analogous to perl's caller which will tell you what called the current function?

RE: [PHP] function to complete strings with white spaces on the left

2001-05-21 Thread Craig Vincent
untested! ? if (strlen($word) 17) { $padding = 17-strlen($word); $word .= str_repeat(' ', $padding); unset($padding); } ? The reason for the if statement is that str_repeat will produce an error if 17-strlen($word) = 0 and that'll break your scriptof course you could remove the if state if

Re: [PHP] function to complete strings with white spaces on the left

2001-05-21 Thread Markus Fischer
On Mon, May 21, 2001 at 10:04:21AM -0500, Tolga thorr Orhon wrote : One improvment: $strpad = HELLO; echo str_pad(substr($strpad,0,17),17); why ? - Markus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: [PHP] function to complete strings with white spaces on the left

2001-05-20 Thread Mark Maggelet
On Sun, 20 May 2001 22:03:05 -0300, Carlos Fernando Scheidecker Antunes ([EMAIL PROTECTED]) wrote: Hello All, I need to output a string that must always be 17 characters even if the inside value is not. Supose a have the HELLO word that is a 5 character string and I need to output HELLO

Re: [PHP] function login

2001-05-17 Thread Plutarck
Define how index.php calls the login.php file. I assume you mean index.php include() login.php, which has include() on config.php? If so, be sure that the path to config.php as included in login.php is right. Use the fully qualified path to ensure it works right. Other than that, as long as the

Re: [PHP] function not working after header call

2001-05-08 Thread Johannes Janson
Well, what can I say??? Magic windows Reboot the system or post a message and it works! johannes Johannes Janson [EMAIL PROTECTED] schrieb im Newsbeitrag 9d93c3$7d8$[EMAIL PROTECTED]">news:9d93c3$7d8$[EMAIL PROTECTED]... Hi, I just don't get it...I have a form where the user enters

RE: [PHP] function in if statement not executed ?-- Help

2001-04-23 Thread Jason Murray
if($l==d) { log_user(); } else if($r==d) { add_user(); } else { $r =y; } looks like: 1. $l is not set to d. 2. $r is not set to d. $r may be set to y by this code. Did you check it? Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: [PHP] function in if statement not executed ?-- Help

2001-04-23 Thread PHPhyperboy
] To: 'PHPhyperboy' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, April 23, 2001 10:25 PM Subject: RE: [PHP] function in if statement not executed ?-- Help if($l==d) { log_user(); } else if($r==d) { add_user(); } else { $r =y; } looks like: 1. $l is not set to d. 2. $r

Re: [PHP] function to add %20 in place of blank spaces

2001-04-18 Thread Alexander Skwar
So sprach Nando2 am Mon, Apr 16, 2001 at 03:28:11PM -0300: Can anyone remind me of that? (raw)urlencode Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die

RE: [PHP] function to add %20 in place of blank spaces

2001-04-16 Thread Boget, Chris
I'm trying to remember what is the function to replace blank spaces with %20. Can anyone remind me of that? urlencode(); Chris

Re: [PHP] function to add %20 in place of blank spaces

2001-04-16 Thread Felix Kronlage
On Mon, Apr 16, 2001 at 03:28:11PM -0300, Nando2 wrote: I'm trying to remember what is the function to replace blank spaces with %20. Can anyone remind me of that? urlencode() urldecode() -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0

<    1   2   3   4   5   6   >