Re: [PHP] Re: function returning true or errors

2002-04-18 Thread Erik Price
On Thursday, April 18, 2002, at 11:38 AM, Julio Nobrega Trabalhando wrote: function custom_function() { if ($error == 0) { return true; } else { return Error!; } } if (custom_function() != Error!) { echo Success; } else { echo Error; } Your

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

2002-04-07 Thread Charlie Killian
I don't now of one. Charlie Is there one? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2002-04-07 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Charlie Killian) wrote: Is there one? I don't now of one. That's because PHP doesn't have one, it has two: http://php.net/preg-quote and http://php.net/quotemeta. (Read the docs carefully; these functions escape slightly different

[PHP] Re: function calls...Incorrect output...What am I doing wrong?

2002-03-29 Thread Eric Starr
Testing reply... ** Eric Starr [EMAIL PROTECTED] wrote in message 003f01c1d748$8785e200$[EMAIL PROTECTED]">news:003f01c1d748$8785e200$[EMAIL PROTECTED]... I am learning PHP and I am having some trouble. I am working on a hit counter application. I am using PHP 4 even though the

[PHP] Re: function calls...Incorrect output...What am I doing wrong?

2002-03-29 Thread Eric Starr
Please notice that I am attepting to call a function hitCounterPosition() in the constructor Counter with this line of code: $this-mCountPosition = $this-hitCounterPosition(); The very next line in the code prints out the value of mCountPosition printf( . $this-mCountPosition . BR);

RE: [PHP] Re: function calls...Incorrect output...What am I doing wrong?

2002-03-29 Thread Rick Emery
:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 1:01 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: function calls...Incorrect output...What am I doing wrong? Please notice that I am attepting to call a function hitCounterPosition() in the constructor Counter with this line of code

RE: [PHP] Re: function calls...Incorrect output...What am I doing wrong?

2002-03-29 Thread Rick Emery
I mean: $this-mFileArray: -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 1:13 PM To: 'Eric Starr'; [EMAIL PROTECTED] Subject: RE: [PHP] Re: function calls...Incorrect output...What am I doing wrong? Your problem is that you reference

[PHP] Re: Function Not Accepting Variable Values From a Form

2002-03-21 Thread Julio Nobrega Trabalhando
Scope. Try to pass the values as the function reference (inside the ()), 'global' them, or use $_POST[''], from 4.1 and beyond. If you don't know what's a 'scope', there's an entry on the manual that can explain better. -- Julio Nobrega. Um dia eu chego lá:

[PHP] Re: Function Not Accepting Variable Values From a Form

2002-03-21 Thread Dr. Shim
I will try $_POST[] first. I do that under the value parameter for each form element? input type=text name=author value=?php $_POST['author'] ? Right? -- Julio Nobrega Trabalhando [EMAIL PROTECTED] wrote in message [EMAIL

RE: [PHP] Re: Function Not Accepting Variable Values From a Form

2002-03-21 Thread Rick Emery
you still need to declare the values as GLOBAL -Original Message- From: Dr. Shim [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 11:12 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Function Not Accepting Variable Values From a Form I will try $_POST[] first. I do that under

[PHP] Re: Function Not Accepting Variable Values From a Form

2002-03-21 Thread Dr. Shim
function verify() { echo Verify called. Values are...br\n Title: . $_POST['title'] . br\n# This works! Author: $authorbr\n Lead Actors: $actorsbr\n Poster: $posterbr\n Summ.: $summerybrbr\n\n Rev.: $reviewbrbr\n\n; } -- PHP General

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

2002-02-22 Thread Murray Chamberlain
look on php.net for preg_replace and functions like that, they use regular expressions to replace characters Digitalkoala [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi folks, Is there a function that extracts numbers from a string? I can do this with

Re: [PHP] Re: function? variable?

2002-02-12 Thread Jason Whitaker
OK,... For each page on my site there will be a different title. Example: title ?php echo ?witakr home? ? /title or title ?php echo ?witakr News? ? /title What I want to know how to take the word that is currently in the place of News or home.. Wait.. I think I may

Re: [PHP] Re: function? variable?

2002-02-12 Thread Jason Whitaker
I'm sure i confused someone... The $pagetitle1 and $pagetitle are supposed to be the same... I made a couple typos -- Jason Whitaker Jason Whitaker [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... : OK,... : : For each page on my site there will be a different

[PHP] Re: function not returning TRUE

2002-02-12 Thread Bart Veldhuizen
Hi Nick, did you double-check your query ($qry)? Run it from the mysql client or from phpMyAdmin to make sure its returning some rows of data. Cheers, Bart Nick Wilson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all Can anyone see any reason why this function does not

[PHP] Re: function? variable?

2002-02-11 Thread Jason Whitaker
I just saw something with my code there.. i have my link tag inside the title tag.. i will have to fix that :) -- Jason Whitaker Jason Whitaker [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... : Is there a way to set a variable or is there a function that takes

Re: [PHP] Re: function? variable?

2002-02-11 Thread Keith V. (Vance Consulting LLC)
Can you be more specific? I am just guessing here but is this what you want: ? $title = home; ? html head title ? echo $title; ? /title /head body ? echo $title; ? /body /html Perhaps, I am not getting what you are asking for. On 11 Feb 2002 at 23:34, Jason Whitaker wrote: I just saw

Re: [PHP] Re: function? variable?

2002-02-11 Thread Steven Walker
Jason, If I understand your question, you want to display the contents of a variable to screen? Try this: html head title/title /head body ? $test_variable = this is a test; echo Here is what it says: $test_variable; ? /body /html Also note that you do not need

[PHP] Re: function trouble: pass by referrence

2002-01-21 Thread David Robley
[EMAIL PROTECTED] (Bryan McCloskey) wrote in [EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: Hello all, I'm trying to pass the $HTTP_POST_VARS array into a function to run some things like strip_tags, trim, and htmlspecialchars on all of the variables. If possible, I would like to pass this

[PHP] Re: Function Call Line Number

2001-11-15 Thread Richard Lynch
Jason G. wrote: Does anyone know of a way, that from within a function, you can determine what line number and file the function was called on? Cannot be done with existing built-in PHP functions... Feel free to add that feature to the PHP source and contribute it :-) I did try: function

[PHP] Re: Function Call Line Number

2001-11-14 Thread dav
Well, I don't know either but I was thinking about that... Usually this $lineno = __LINE__ would be avaluated when the function is called, this mean it gives the __LINE__ of the function call itself. Why don't you try a more simple include/require instead of calling a funcion ?(see example) but

[PHP] Re: Function Call Line Number

2001-11-14 Thread dav
Another thing... if the $lineno variable isn't defined yet, maybe the parser first try a cast into __LINE__ type, so even if the assign procedure is called at the function call, the line is evaluated at the funcion definition step... but maybe it's a bullship :-) J Dav [EMAIL PROTECTED] ha

[PHP] Re: Function registration failed and Module compiled with debug=0 errors

2001-11-14 Thread Richard Lynch
D'oh!!! That's what I get for trying copying and pasting with Mandrake's screwy ./configure line! An oddly altered php.ini file was indeed the problem. Seems obvious in retrospect -- php.ini was trying to load Mandrake's old dynamic modules that are already static in my new PHP Module, so

[PHP] Re: Function Call Line Number

2001-11-13 Thread _lallous
I guess that is not possible with PHP yet. Jason G. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Does anyone know of a way, that from within a function, you can determine what line number and file the function was called on? I did try: function

Re: [PHP] Re: function names

2001-10-26 Thread Olexandr Vynnychenko
Hello Mike, Thursday, October 25, 2001, 10:09:18 PM, you wrote: MF Actually your problem is with the function itself. In order for it to work MF you need to use the this keyword: MF class A { MF var $xxx; MF function print() { MF echo $this-xxx; MF } MF } MF You may also

[PHP] Re: function names

2001-10-25 Thread Mike Frazer
Actually your problem is with the function itself. In order for it to work you need to use the this keyword: class A { var $xxx; function print() { echo $this-xxx; } } You may also run into problems with calling the function print(), I don't know for sure. But the problem

Re: [PHP] Re: Function call introspection: possible or not?

2001-09-07 Thread Geoff Caplan
Richard I don't think there is such a documented function available in PHP yet... Use the source, and do it. :-) Sadly I am a humble PHP hacker with no system programming skills, so I'll have to leave it to the experts. Still - it would be a very useful feature, I think, if anyone with the

[PHP] Re: function like exit?

2001-08-19 Thread Christopher Sogge Røtnes
Nafiseh Saberi [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi. do we have function like exit in php?? for exit from program. best regards. For the love of. 1) yes. its called exit you can also use die 2) the simplest of searches on www.php.net

[PHP] Re: Function to Build Trees

2001-08-19 Thread Richard Lynch
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 the list below, fruit, apples, oranges, red are the keys and in the fruit array are the

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

2001-08-01 Thread Fredrik Arild Takle
You might wanna make a function for links: ?php function makelink($descr, $href) { global $printer; if ($printer) { $link = $descr ($href); } else { $link = a href=\$href\$descr/a; } return $link; } To echo an link in a site, do: html above ?php echo

[PHP] Re: Function? How to find if xy values are within a coordinates of polygon?

2001-07-11 Thread Lasse
Sed [EMAIL PROTECTED] wrote in message 009301c10a46$3db4eba0$0100a8c0@mamma">news:009301c10a46$3db4eba0$0100a8c0@mamma... I'm making a map (image) which you can click on and the script finds the area-code based on where you click on the map. Before I spend time on writing my own code to find

[PHP] Re: Function? How to find if xy values are within a coordinates of polygon?

2001-07-11 Thread SED
Thanks to Lasse I found a good solution, you can view it here: http://softlab.od.ua/algo/other/alg/node158.html Thanks! SED -Original Message- From: Lasse [mailto:[EMAIL PROTECTED]] Sent: 11. júlí 2001 22:02 To: [EMAIL PROTECTED] Subject: [PHP] Re: Function? How to find if xy

RE: [PHP] RE: Function to compare an array with another array

2001-03-15 Thread Tim Ward
/e-mail-disclaimer.html -Original Message- From: Fang Li [mailto:[EMAIL PROTECTED]] Sent: 15 March 2001 14:03 To: Tim Ward; 'Jimmy Bäckström'; PHP General List Subject: RE: [PHP] RE: Function to compare an array with another array Hi, I am trying to use the Function ArrayCompare

[PHP] RE: function questions

2001-03-05 Thread Tim Ward
why are you using this construct instead of echo()? e.g. echo("Hey there " . foo::bar($baz) . " how are you doing?"); Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html

[PHP] RE: Function to compare an array with another array

2001-03-05 Thread Tim Ward
function ArrayCompare($array1, $array2) { $answer = new Array() foreach ($array1 as $element) { if (($key = array_search($element, $array2)) === false) { $answer[$key] = $array2[$key]; } } return $answer; } this

<    1   2