Re: [PHP] Return XML attribute in DOM

2009-09-08 Thread Peter Ford
Matthew Croud wrote: Doesn't the DOM have the getAttribute() method? Thanks, Ash http://www.ashleysheridan.co.uk It's not in my reference, though I see it in the PHP manual now. This is what I have: _ $dom = new DomDocument(); $dom - load(items.xml);

Re: [PHP] Return XML attribute in DOM

2009-09-08 Thread Matthew Croud
Cheers Guys, Your the greatest ! On 8 Sep 2009, at 09:08, Peter Ford wrote: Matthew Croud wrote: Doesn't the DOM have the getAttribute() method? Thanks, Ash http://www.ashleysheridan.co.uk It's not in my reference, though I see it in the PHP manual now. This is what I have:

Re: [PHP] Return XML attribute in DOM

2009-09-07 Thread Ashley Sheridan
On Mon, 2009-09-07 at 16:37 +0100, Matthew Croud wrote: I'm at my wits end here, so close to the finishing line! Is there a method to return an attribute value of an XML node using DOM, I can check to see if an attribute exists using hasAttributes() But I can't retrieve the value. I'm

Re: [PHP] Return XML attribute in DOM

2009-09-07 Thread Matthew Croud
Doesn't the DOM have the getAttribute() method? Thanks, Ash http://www.ashleysheridan.co.uk It's not in my reference, though I see it in the PHP manual now. This is what I have: _ $dom = new DomDocument(); $dom - load(items.xml); $topics = $dom -

Re: [PHP] return language of a word

2008-09-29 Thread Robin Vickery
2008/9/29 shahrzad khorrami [EMAIL PROTECTED]: hi all, is there any function to return us the lanuage of a word in the sentence? for example : My name is شهرزاد . when it sees شهرزاد notice that is a persian language. As others have said, you can check what unicode block the characters are

Re: [PHP] Return an Array and immediately reference an index

2008-04-12 Thread Jim Lucas
Bojan Tesanovic wrote: On Apr 12, 2008, at 12:33 AM, Daniel Kolbo wrote: Hello, I want to return an array from function and reference an index all in one line. Is this possible? In the code below I want I want $yo to be the array(5,6). Here is what I've tried, function returnarray() {

Re: [PHP] Return an Array and immediately reference an index

2008-04-12 Thread Stut
On 12 Apr 2008, at 00:31, Daniel Kolbo wrote: Philip Thompson wrote: On Apr 11, 2008, at 5:33 PM, Daniel Kolbo wrote: I want to return an array from function and reference an index all in one line. Is this possible? In the code below I want I want $yo to be the array(5,6). Here is what

Re: [PHP] Return an Array and immediately reference an index

2008-04-12 Thread Daniel Kolbo
Jim Lucas wrote: Bojan Tesanovic wrote: On Apr 12, 2008, at 12:33 AM, Daniel Kolbo wrote: Hello, I want to return an array from function and reference an index all in one line. Is this possible? In the code below I want I want $yo to be the array(5,6). Here is what I've tried,

Re: [PHP] Return an Array and immediately reference an index

2008-04-12 Thread Daniel Kolbo
Stut wrote: On 12 Apr 2008, at 00:31, Daniel Kolbo wrote: Philip Thompson wrote: On Apr 11, 2008, at 5:33 PM, Daniel Kolbo wrote: I want to return an array from function and reference an index all in one line. Is this possible? In the code below I want I want $yo to be the array(5,6).

Re: [PHP] Return an Array and immediately reference an index

2008-04-12 Thread Stut
On 12 Apr 2008, at 15:18, Daniel Kolbo wrote: Stut wrote: On 12 Apr 2008, at 00:31, Daniel Kolbo wrote: Philip Thompson wrote: On Apr 11, 2008, at 5:33 PM, Daniel Kolbo wrote: I want to return an array from function and reference an index all in one line. Is this possible? In the code

Re: [PHP] Return an Array and immediately reference an index

2008-04-12 Thread Nathan Nobbe
On Fri, Apr 11, 2008 at 6:33 PM, Daniel Kolbo [EMAIL PROTECTED] wrote: search the archives ;) http://www.mail-archive.com/php-general@lists.php.net/msg224626.html -nathan

Re: [PHP] Return an Array and immediately reference an index

2008-04-12 Thread Casey
On Sat, Apr 12, 2008 at 9:12 AM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Fri, Apr 11, 2008 at 6:33 PM, Daniel Kolbo [EMAIL PROTECTED] wrote: search the archives ;) http://www.mail-archive.com/php-general@lists.php.net/msg224626.html -nathan ?php function ReturnArray() { return

Re: [PHP] Return an Array and immediately reference an index

2008-04-12 Thread Nathan Nobbe
On Sat, Apr 12, 2008 at 12:18 PM, Casey [EMAIL PROTECTED] wrote: On Sat, Apr 12, 2008 at 9:12 AM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Fri, Apr 11, 2008 at 6:33 PM, Daniel Kolbo [EMAIL PROTECTED] wrote: search the archives ;)

Re: [PHP] Return an Array and immediately reference an index

2008-04-12 Thread Casey
On Sat, Apr 12, 2008 at 9:35 AM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Sat, Apr 12, 2008 at 12:18 PM, Casey [EMAIL PROTECTED] wrote: On Sat, Apr 12, 2008 at 9:12 AM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Fri, Apr 11, 2008 at 6:33 PM, Daniel Kolbo [EMAIL PROTECTED] wrote:

Re: [PHP] Return an Array and immediately reference an index

2008-04-12 Thread Daniel Kolbo
Casey wrote: On Sat, Apr 12, 2008 at 9:35 AM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Sat, Apr 12, 2008 at 12:18 PM, Casey [EMAIL PROTECTED] wrote: On Sat, Apr 12, 2008 at 9:12 AM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Fri, Apr 11, 2008 at 6:33 PM, Daniel Kolbo [EMAIL PROTECTED]

Re: [PHP] Return an Array and immediately reference an index

2008-04-12 Thread Bojan Tesanovic
On Apr 12, 2008, at 6:18 PM, Casey wrote: On Sat, Apr 12, 2008 at 9:12 AM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Fri, Apr 11, 2008 at 6:33 PM, Daniel Kolbo [EMAIL PROTECTED] wrote: search the archives ;) http://www.mail-archive.com/php-general@lists.php.net/msg224626.html -nathan

Re: [PHP] Return an Array and immediately reference an index

2008-04-11 Thread Philip Thompson
Top-posting side comment: It's not nice to hijack threads. My comments are below... On Apr 11, 2008, at 5:33 PM, Daniel Kolbo wrote: Hello, I want to return an array from function and reference an index all in one line. Is this possible? In the code below I want I want $yo to be the

Re: [PHP] Return an Array and immediately reference an index

2008-04-11 Thread Daniel Kolbo
Philip Thompson wrote: Top-posting side comment: It's not nice to hijack threads. My comments are below... On Apr 11, 2008, at 5:33 PM, Daniel Kolbo wrote: Hello, I want to return an array from function and reference an index all in one line. Is this possible? In the code below I want

Re: [PHP] Return an Array and immediately reference an index

2008-04-11 Thread Philip Thompson
On Apr 11, 2008, at 6:31 PM, Daniel Kolbo wrote: Philip Thompson wrote: Top-posting side comment: It's not nice to hijack threads. My comments are below... On Apr 11, 2008, at 5:33 PM, Daniel Kolbo wrote: Hello, I want to return an array from function and reference an index all in one

Re: [PHP] Return an Array and immediately reference an index

2008-04-11 Thread Bojan Tesanovic
On Apr 12, 2008, at 12:33 AM, Daniel Kolbo wrote: Hello, I want to return an array from function and reference an index all in one line. Is this possible? In the code below I want I want $yo to be the array(5,6). Here is what I've tried, function returnarray() { return

RE: [PHP] Return or not to return, that is the question

2007-05-30 Thread Edward Kay
Just a quick straw-poll really: What is your take on using 'return' when you end a function, if you don't actually need to return a value? If you have to return say a true/false as the result of an operation, then it's an obvious choice. But what if all the function does is perform an

Re: [PHP] Return or not to return, that is the question

2007-05-30 Thread Dave Goodchild
If there is no need to return a value then I don't do so. However, the function is going to process something, and surely you should check that the processing has succeeded or failed?

Re: [PHP] Return or not to return, that is the question

2007-05-30 Thread Paul Scott
On Wed, 2007-05-30 at 12:20 +0100, Dave Goodchild wrote: If there is no need to return a value then I don't do so. However, the function is going to process something, and surely you should check that the processing has succeeded or failed? If you unit test, then returns become quite

Re: [PHP] Return or not to return, that is the question

2007-05-30 Thread Zoltán Németh
2007. 05. 30, szerda keltezéssel 11.52-kor Richard Davey ezt írta: Hi all, Just a quick straw-poll really: What is your take on using 'return' when you end a function, if you don't actually need to return a value? If you have to return say a true/false as the result of an operation,

RE: [PHP] Return or not to return, that is the question

2007-05-30 Thread Chris Boget
If there is no need to return a value then I don't do so. However, the function is going to process something, and surely you should check that the processing has succeeded or failed? This is precisely the point I was going to make. Unless an argument is passed in by reference for

Re: [PHP] Return or not to return, that is the question

2007-05-30 Thread Darren Whitlen
Chris Boget wrote: If there is no need to return a value then I don't do so. However, the function is going to process something, and surely you should check that the processing has succeeded or failed? This is precisely the point I was going to make. Unless an argument is passed in by

RE: [PHP] Return or not to return, that is the question

2007-05-30 Thread Jay Blanchard
[snip] All depends on the function. function someFunc(){ $this-counter++; if($this-counter 100) $this-counter = 0; } Something that simple wont need a return at all. [/snip] Classically this would need a return, because $this-counter is going to be less than 100 most of the

Re: [PHP] Return or not to return, that is the question

2007-05-30 Thread Richard Lynch
On Wed, May 30, 2007 5:52 am, Richard Davey wrote: Just a quick straw-poll really: What is your take on using 'return' when you end a function, if you don't actually need to return a value? If you have to return say a true/false as the result of an operation, then it's an obvious choice.

Re: [PHP] Return or not to return, that is the question

2007-05-30 Thread Paul Novitski
At 5/30/2007 05:41 AM, Richard Davey wrote: /* check connection */ if (mysqli_connect_errno()) { printf(Connect failed: %s\n, mysqli_connect_error()); exit(); } If that was wrapped in a function, sticking 'return false' within the connect_error check is useful why exactly? Equally the

Re: [PHP] Return or not to return, that is the question

2007-05-30 Thread Richard Lynch
On Wed, May 30, 2007 7:42 am, Darren Whitlen wrote: Chris Boget wrote: If there is no need to return a value then I don't do so. However, the function is going to process something, and surely you should check that the processing has succeeded or failed? This is precisely the point I was

RE: [PHP] Return or not to return, that is the question

2007-05-30 Thread Richard Lynch
On Wed, May 30, 2007 7:56 am, Jay Blanchard wrote: Classically this would need a return, because $this-counter is going to be less than 100 most of the time, and you may want to return the value at some point. Or you may not ever need to return it. And if you return it for no reason, you

Re: [PHP] return bounced email to specific email address

2007-01-31 Thread Richard Lynch
On Tue, January 30, 2007 9:44 am, [EMAIL PROTECTED] wrote: is it possible to specify email address in mail() function where bounced email could return? I checked http://us2.php.net/manual/en/function.mail.php but didn't find anything. Some MTAs follow some standards which at one time or

Re: [PHP] return bounced email to specific email address

2007-01-30 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-30 16:44:38 +0100: is it possible to specify email address in mail() function where bounced email could return? Yes, see ftp://ftp.rfc-editor.org/in-notes/rfc2821.txt I checked http://us2.php.net/manual/en/function.mail.php but didn't find anything. That's ok,

Re: [PHP] return bounced email to specific email address

2007-01-30 Thread Chris
[EMAIL PROTECTED] wrote: hi, is it possible to specify email address in mail() function where bounced email could return? I checked http://us2.php.net/manual/en/function.mail.php but didn't find anything. That's the right place. It's the 5th parameter you want to change. -- Postgresql php

Re: [PHP] Return Values Copied? Copied if By Reference?

2006-08-03 Thread Richard Lynch
On Thu, July 27, 2006 1:05 pm, Adam Zey wrote: Then how come when I do a foreach on an array (without modifying anything within the foreach), it still makes a copy of the array that consumes memory? I think it's dangerous to generalize that it's always best to let PHP make copies of things. In

Re: [PHP] Return Values Copied? Copied if By Reference?

2006-07-27 Thread Robert Cummings
On Thu, 2006-07-27 at 01:35, Larry Garfield wrote: On Wednesday 26 July 2006 21:41, Robert Cummings wrote: I'm working on some code that would be called to generate a cell in a possibly large table and therefore a small difference in performance may have a significant impact. PHP

Re: [PHP] Return Values Copied? Copied if By Reference?

2006-07-27 Thread Adam Zey
Robert Cummings wrote: On Thu, 2006-07-27 at 01:35, Larry Garfield wrote: On Wednesday 26 July 2006 21:41, Robert Cummings wrote: I'm working on some code that would be called to generate a cell in a possibly large table and therefore a small difference in performance may have a significant

RE: [PHP] Return Values Copied? Copied if By Reference?

2006-07-27 Thread KermodeBear
Robert Cummings wrote: Then how come when I do a foreach on an array (without modifying anything within the foreach), it still makes a copy of the array that consumes memory? I think it's dangerous to generalize that it's always best to let PHP make copies of things. In the foreach situation,

Re: [PHP] Return Values Copied? Copied if By Reference?

2006-07-27 Thread Adam Zey
KermodeBear wrote: Robert Cummings wrote: Then how come when I do a foreach on an array (without modifying anything within the foreach), it still makes a copy of the array that consumes memory? I think it's dangerous to generalize that it's always best to let PHP make copies of things. In

Re: [PHP] Return Values Copied? Copied if By Reference?

2006-07-27 Thread Robert Cummings
On Thu, 2006-07-27 at 14:48, Adam Zey wrote: KermodeBear wrote: Robert Cummings wrote: Then how come when I do a foreach on an array (without modifying anything within the foreach), it still makes a copy of the array that consumes memory? I think it's dangerous to generalize that

Re: [PHP] Return Values Copied? Copied if By Reference?

2006-07-26 Thread Robert Cummings
On Wed, 2006-07-26 at 22:29, Michael B Allen wrote: Is a function return value copied? If the value is an integer I suppose it is but what about a string or an array? If you pass by reference is the return value still copied? For example, is this: function foo($arr) { $arr[] =

Re: [PHP] Return Values Copied? Copied if By Reference?

2006-07-26 Thread Larry Garfield
On Wednesday 26 July 2006 21:41, Robert Cummings wrote: I'm working on some code that would be called to generate a cell in a possibly large table and therefore a small difference in performance may have a significant impact. PHP uses copy-on-write and so copies are essentially shared

Re: [PHP] Return XML using PHP and Content-Type with UTF-8 breaks the UTF-8

2006-07-20 Thread Mathijs
Ray Hauge wrote: On Wednesday 19 July 2006 09:27, Mathijs wrote: Hello there, I Have an problem with UTF-8 and XML. I Output perfect XML (according to IE, Opera and Firefox). I use the Content-Type header with text/xml; charset=utf-8. For some reason this breaks UTF-8 output. When i remove it

Re: [PHP] Return XML using PHP and Content-Type with UTF-8 breaks the UTF-8

2006-07-20 Thread nicolas figaro
Mathijs a écrit : Hello there, I Have an problem with UTF-8 and XML. I Output perfect XML (according to IE, Opera and Firefox). I use the Content-Type header with text/xml; charset=utf-8. For some reason this breaks UTF-8 output. When i remove it it works. But i need the text/xml header. Hi,

Re: [PHP] Return XML using PHP and Content-Type with UTF-8 breaks the UTF-8

2006-07-19 Thread Ray Hauge
On Wednesday 19 July 2006 09:27, Mathijs wrote: Hello there, I Have an problem with UTF-8 and XML. I Output perfect XML (according to IE, Opera and Firefox). I use the Content-Type header with text/xml; charset=utf-8. For some reason this breaks UTF-8 output. When i remove it it works. But

Re: [PHP] return a formatted difference between two dates

2006-04-18 Thread Richard Lynch
On Mon, April 17, 2006 8:55 pm, tedd wrote: As I understand it, it won't make any difference if you use strtotime() See: http://www.weberdev.com/strtotime Errr, yeah. Only problem is, he needs non-existent function that might be named timetostr which takes an elapsed time and turns it into a

Re: [PHP] return a formatted difference between two dates

2006-04-17 Thread Richard Lynch
On Fri, April 14, 2006 1:24 pm, jonathan wrote: is there a function to take a second count and return it as a formatted difference? like a date_diff('H hours i',6133) that uses date()'s formatting. I think he means something not unlike: function human_time($seconds){ $result = and .

Re: [PHP] return a formatted difference between two dates

2006-04-17 Thread tedd
At 6:17 PM -0500 4/17/06, Richard Lynch wrote: On Fri, April 14, 2006 1:24 pm, jonathan wrote: is there a function to take a second count and return it as a formatted difference? That, however, is probably not precisely what he wants, as it's WAY off in the months/years thing... :-)

RE: [PHP] return a formatted difference between two dates

2006-04-14 Thread Jay Blanchard
[snip] is there a function to take a second count and return it as a formatted difference? like a date_diff('H hours i',6133) that uses date()'s formatting. [/snip] http://www.php.net/mktime -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] return path of mail function

2006-04-03 Thread Curt Zirzow
On Sun, Apr 02, 2006 at 10:34:48PM -0700, [EMAIL PROTECTED] wrote: The same as before: Return-path: [EMAIL PROTECTED] Envelope-to: [EMAIL PROTECTED] Delivery-date: Mon, 03 Apr 2006 00:35:34 -0500 Received: from nobody by amsterdam.servershost.net with local (Exim 4.52)

Re: [PHP] return path of mail function

2006-04-03 Thread sub
You are better off using the 5th paramater to mail() instead.. mail($to, $sub, $msg, $headers, -f $return); And what if that doesn't work? Is there a 3rd way of doing it that might work? ~Drew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] return path of mail function

2006-04-03 Thread Chris
[EMAIL PROTECTED] wrote: You are better off using the 5th paramater to mail() instead.. mail($to, $sub, $msg, $headers, -f $return); And what if that doesn't work? Is there a 3rd way of doing it that might work? Ask your host if they allow you to change it on the fly. Explain what you're

Re: [PHP] return path of mail function

2006-04-02 Thread Chris
Andrew Darrow wrote: I'm having a problem setting the return-path using the mail function. I seem to be able to modify any of the other header information I want, but not this one item. Here's my code: $headers = Return-Path: Test test@test.com\r\n . From: Test test@test.com\r\n .

Re: [PHP] return path of mail function

2006-04-02 Thread Chris
[EMAIL PROTECTED] wrote: Safe mode is indeed off and sendmail_from has no value. I've modified the code as below: $return=test@test.com; $orig_sendmail_from = ini_get('sendmail_from'); ini_set('sendmail_from', $return); $headers = From: Test test@test.com\r\n . Reply-To: Test

Re: [PHP] return path of mail function

2006-04-02 Thread sub
~Drew www.drewpydraws.com - Original Message - From: Chris [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Sunday, April 02, 2006 10:31 PM Subject: Re: [PHP] return path of mail function [EMAIL PROTECTED] wrote: Safe mode is indeed off and sendmail_from has

Re: [PHP] return path of mail function

2006-04-02 Thread sub
so here http://drewpydraws.com/phpinfo.php ~Drew www.drewpydraws.com - Original Message - From: Chris [EMAIL PROTECTED] To: Andrew Darrow [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Sunday, April 02, 2006 5:02 PM Subject: Re: [PHP] return path of mail function Andrew Darrow

Re: [PHP] Return Path

2005-08-06 Thread Sebastian
try using -f mail($toemail, $subject, $message, $from, '-f [EMAIL PROTECTED]'); [EMAIL PROTECTED] wrote: I don't seem to be able to set the return path using the mail() function. I can't figure out why from will let me set it, but not the return path. $headers = 'From: [EMAIL PROTECTED]' .

Re: [PHP] Return Path [SOLVED]

2005-08-06 Thread sub
, 2005 6:12 AM Subject: Re: [PHP] Return Path try using -f mail($toemail, $subject, $message, $from, '-f [EMAIL PROTECTED]'); [EMAIL PROTECTED] wrote: I don't seem to be able to set the return path using the mail() function. I can't figure out why from will let me set it, but not the return

Re: [PHP] Return value in Combo Box

2004-11-30 Thread David Dickson
Ahmed Abdel-Aliem wrote: Hi, i have a form which user have to fill all the fields in it, when the form is submitted it goes to a validation page which checks if users entered all the required fields. what i want to do is to make the validation page redirect to the form again with the previuosly

Re: [PHP] Return value efficiency question

2004-03-10 Thread trlists
On 10 Mar 2004 Robert Cummings wrote: Overhead is minimal since PHP doesn't actually copy the contents of the container until an attempt to modify it is made. At which time the contents are only actually copied if the internal reference count is greater than 0. Generally this means it won't

Re: [PHP] Return value efficiency question

2004-03-10 Thread Burhan Khalid
Kelly Hallman wrote: Consider this method: function xyz() { return $this-data = unserialize($this-serial); } Maybe I'm just being stupid, but wouldn't that simply return true if the assignment was successful, and false otherwise? [ trimmed ] -- PHP General Mailing List

RE: [PHP] Return value efficiency question

2004-03-10 Thread Ford, Mike [LSS]
On 10 March 2004 13:48, Burhan Khalid wrote: Kelly Hallman wrote: Consider this method: function xyz() { return $this-data = unserialize($this-serial); } Maybe I'm just being stupid, but wouldn't that simply return true if the assignment was successful, and false

Re: [PHP] Return value efficiency question

2004-03-10 Thread messju mohr
On Wed, Mar 10, 2004 at 04:48:06PM +0300, Burhan Khalid wrote: Kelly Hallman wrote: Consider this method: function xyz() { return $this-data = unserialize($this-serial); } Maybe I'm just being stupid, but wouldn't that simply return true if the assignment was successful,

Re: [PHP] Return value efficiency question

2004-03-10 Thread Robert Cummings
On Wed, 2004-03-10 at 08:30, [EMAIL PROTECTED] wrote: On 10 Mar 2004 Robert Cummings wrote: Overhead is minimal since PHP doesn't actually copy the contents of the container until an attempt to modify it is made. At which time the contents are only actually copied if the internal

Re: [PHP] Return value efficiency question

2004-03-09 Thread Robert Cummings
On Wed, 2004-03-10 at 02:07, Kelly Hallman wrote: Consider this method: function xyz() { return $this-data = unserialize($this-serial); } A few assumptions: - Resultant data large enough to warrant discussion of efficiency - I always want to store the unserialized data into

Re: [PHP] Return-Path header and sending email with php

2004-01-26 Thread Marek Kilimajer
You can use a class that sends mails by connecting directly to smtp server, e.g. http://www.phpclasses.org/mimemessage Chris Balay wrote: Good Day Coders - I have built a newsletter program with php. It sends out an e-mail to a couple thousand subcribers every day. All works well. My problem

Re: [PHP] Return-Path header and sending email with php

2004-01-25 Thread David T-G
Chris -- You have started a new thread by taking an existing message and replying to it while merely changing the Subject: line. That is bad, because it breaks threading. Whenever you reply to a message, your mail client generates a References: header that tells all recipients to which

Re: [PHP] Return mysql_fetch_array($result) from a function

2003-11-05 Thread David Otton
On Wed, 5 Nov 2003 14:53:15 +0800, you wrote: I am trying to get the results of a function, which queries MySQL, back into an array for me to order. I only want to print out certain fields (I call the same query, but use different fields in different places). Can someone perhaps show me how to

Re: [PHP] Return mysql_fetch_array($result) from a function

2003-11-05 Thread Chris Shiflett
--- Terence [EMAIL PROTECTED] wrote: I am trying to get the results of a function, which queries MySQL, back into an array for me to order. I only want to print out certain fields (I call the same query, but use different fields in different places). This works is I print out the fields in

Re: [PHP] 'Return values' from links

2003-10-17 Thread David Otton
On Fri, 17 Oct 2003 08:54:23 +0200 (MEST), you wrote: I have a php file in website A's directory, which, when given a key value, will check whether it is valid or not. Is there any way I can treat this website like a function and have it give me a return value after it has run through ? Yes;

Re: [PHP] 'Return values' from links

2003-10-17 Thread David Otton
fputs ($sp, POST /path/to/script.php HTTP/1.0\r\n); fputs ($sp, Host: $host\r\n); Sorry. That should be HTTP/1.1, of course. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Return to browser and keep running!

2003-10-16 Thread Marek Kilimajer
Now I noticed you are on windows. There is a user note in the manual that says that this function does not work as expected on windows: [snip] (by priebe at mi-corporation dot com) Note that register_shutdown_function() does not work under Apache on Windows platforms. Your shutdown function

Re: [PHP] Return to browser and keep running!

2003-10-16 Thread Manuel Vázquez Acosta
Outch! I have read the long discussion of this bug. But I tested the register_shutdown_function on a RH system with Apache 1.3.24 and it didn't work either (the connection keeps alive). The apache_register_shutdown_function doesn't exists in either system. Manu. -- PHP General Mailing List

Re: [PHP] Return to browser and keep running!

2003-10-15 Thread Marek Kilimajer
Use register_shutdown_function() Manuel Vázquez Acosta wrote: Hi all: I need to know if there is a way to send the output buffer to the browser, disconnect from it but keep running a task the user doesn't need to realize that is happening and that may take a few minutes to be complete.

Re: [PHP] Return to browser and keep running!

2003-10-15 Thread Mohamed Lrhazi
Read : PHP's process control functions may do what you need http://us3.php.net/manual/en/ref.pcntl.php Other alternative is to fork an external command with the exec or similar function, which would run another php script, in another php instance, in the background... make sure you

Re: [PHP] Return to browser and keep running!

2003-10-15 Thread Manuel Vázquez Acosta
Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Use register_shutdown_function() I made this test: ?php function shutingdown() { $fh = fopen('d:/tmp/test.out', 'w'); if ($fh) { for($i=0; $i1000; $i++) fwrite($fh, $i\n);

Re: [PHP] Return to browser and keep running!

2003-10-15 Thread Curt Zirzow
* Thus wrote Manuel Vázquez Acosta ([EMAIL PROTECTED]): Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Use register_shutdown_function() register_shutdown_function('shutingdown'); echo Running...; flush(); exit(); ? But the browser gets this:

Re: [PHP] Return to browser and keep running!

2003-10-15 Thread Manuel Vázquez Acosta
Add before the exit: set_time_limit(0); http://php.net/set_time_limit Curt You didn't get the idea. I want to be able to keep running a script disconnected from the browser; once all the output has been sent to the browser there's no need for the user to wait until the script finish its

RE: [PHP] Return to browser and keep running!

2003-10-15 Thread Chris W. Parker
Manuel Vázquez Acosta mailto:[EMAIL PROTECTED] on Wednesday, October 15, 2003 5:46 PM said: set_time_limit(0); makes the scripts to run completely without the 30 seconds error; but it will keep the connection with the browser; so it does not solve the problem though I think you want to

Re: [PHP] return all non-tag characters

2003-06-22 Thread Robert Cummings
Everything you need is at: http://www.php.net/manual/en/function.strip-tags.php Cheers, Rob. Mike Migurski wrote: I want to be able to retrieve and return all character that are not located in html tags. For example: font size=\3\ color=\#336699\1234567/font or

Re: [PHP] return all non-tag characters

2003-06-21 Thread Mike Migurski
I want to be able to retrieve and return all character that are not located in html tags. For example: font size=\3\ color=\#336699\1234567/font or marquee1234567/marquee I would just like it to be equal to 1234567, but I would need it to work with any tags and attributes. A good starting

Re: [PHP] Return Character in a Text File?

2003-03-27 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If you use \r\n instead of \n notepad should be fine. Winblows uses CRLF for everything... On Thursday 27 March 2003 10:07 am, Jay Paulson wrote: I have a slight problem. Is there anyway to make a text file with a return character that doesn't

RE: [PHP] Return Character in a Text File?

2003-03-27 Thread Don Read
On 27-Mar-2003 Jay Paulson wrote: I have a slight problem. Is there anyway to make a text file with a return character that doesn't show up in windows notepad as a gibberish character and actually puts a return in it? Right now I'm using the \n for the return but it doesn't get read in

RE: [PHP] return the amount of records in a mysql databace

2002-09-22 Thread Mark Charette
select count(*) as n from ... where ... -Original Message- From: Philip J. Newman [mailto:[EMAIL PROTECTED]] Can someone point me in the right direction to find out how i can return the amount of records in a mysql databace ? -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] return the amount of records in a mysql databace

2002-09-22 Thread Jeff Bluemel
this is only going to return records in a table, and not in a database select count(*) as n from ... where ... -Original Message- From: Philip J. Newman [mailto:[EMAIL PROTECTED]] Can someone point me in the right direction to find out how i can return the amount of records in a

Re: [PHP] return the amount of records in a mysql databace

2002-09-22 Thread Chris Shiflett
Look through the MySQL functions. I seem to recall that there is a function for just about anything, and all you really want to do is find how many rows are in all the tables in a particular database. Thus, a couple of loops is all you need, with the outer one looping through each table

Re: [PHP] return the amount of records in a mysql databace

2002-09-22 Thread Philip J. Newman
); - Original Message - From: Mark Charette [EMAIL PROTECTED] To: Philip J. Newman [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, September 23, 2002 1:28 AM Subject: RE: [PHP] return the amount of records in a mysql databace select count(*) as n from ... where ... -Original

RE: [PHP] return the amount of records in a mysql databace

2002-09-22 Thread John Holmes
]] Sent: Sunday, September 22, 2002 11:46 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] return the amount of records in a mysql databace this is only going to return records in a table, and not in a database select count(*) as n from ... where ... -Original Message- From

Re: [PHP] return the amount of records in a mysql databace

2002-09-22 Thread Philip J. Newman
select count(*) as n from ... where ... This worked well for me. - Original Message - From: John Holmes [EMAIL PROTECTED] To: 'Jeff Bluemel' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, September 23, 2002 1:28 PM Subject: RE: [PHP] return the amount of records in a mysql databace

Re: [PHP] return array

2002-06-06 Thread Jule Slootbeek
try: list($doo, $dah) = my_function(); thanks alot that was it list ($array['name'], $array['password']); Jule -- Jule Slootbeek [EMAIL PROTECTED] http://blindtheory.cjb.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] return multiple value from function

2002-04-29 Thread Cal Evans
no, it's not possible to do it that way. If you need to return multiple values from a function, your best bet is to return an array or some kind of record structure. By design, in almost all languages, functions only return a single value. =C= * * Cal Evans * Journeyman Programmer *

Re: [PHP] return multiple value from function

2002-04-29 Thread Richard Emery
?php function funca($a,$b) { $q=$a; $w=$b; return array($w,$q); } $e=123; $r=456; list($z,$x) = funca($e,$r); print $z, $x\n; ? - Original Message - From: sanjay [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 29, 2002 9:11 AM Subject: [PHP] return multiple value from

Re: [PHP] return multiple value from function

2002-04-29 Thread Jason Wong
On Monday 29 April 2002 22:11, sanjay wrote: Hi List, I am new to php programming and wanted to know if it is possible to return multiple value from a function like cgi programs. How can I get the following result using php. ($var1, $var2) = myfunction($a,$b); function myfunction($c,$d)

Re: [PHP] return multiple value from function

2002-04-29 Thread 1LT John W. Holmes
Best you can do is return an array and call it like this: function myfunction($a,$b) { $r[0] = $a + 1; $r[1] = $b + 1; return $r; } list($c,$d) = myfunction(10,20); Adapt to your needs. ---John Holmes... - Original Message - From: sanjay [EMAIL PROTECTED] To: [EMAIL

Re: [PHP] return multiple value from function

2002-04-29 Thread sanjay
Thnaks. It solved my problem. sanjay - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 29, 2002 7:50 PM Subject: Re: [PHP] return multiple value from function On Monday 29 April 2002 22:11, sanjay wrote: Hi List, I am new to php

Re: [PHP] Return more than 255 chars

2002-04-22 Thread Scott St. John
Change nvarchar to varchar, ntext to text. I do not think you can return a nvarchar from SQL Server like that. Was this imported from Excel? -Scott On Mon, 22 Apr 2002, Jeff Hatcher wrote: I'm running Advance Server with MSSQL 2000 Enterprise. I can not get php to return more than 255

Re: [PHP] Return path (php/sendmail)

2002-04-12 Thread Analysis Solutions
Hi Anthony: On Fri, Apr 12, 2002 at 03:27:14AM -0400, Anthony Rodriguez wrote: My Web hosting provider runs php (4.1.1) / sendmail (8.10.2) / apache (1.3.20) / linux red hat (6.2) and I don't get bounced e-mails. Put a from line in the additional headers argument: mail($To, $Subject,

Re: [PHP] Return-Path

2002-04-05 Thread Jason Wong
On Friday 05 April 2002 20:49, Anthony Rodriguez wrote: Can you help me? When I call the following script: (1) ?php (2) mail([EMAIL PROTECTED], (3) Test, (4) Test, (5) From:SBW Research [EMAIL PROTECTED]\r\n, (6) Return-Path:[EMAIL PROTECTED]\r\n); (7) exit; (8) ?

Re: [PHP] return

2002-04-01 Thread Jordan K. Martin
- Original Message - From: Rasmus Lerdorf [EMAIL PROTECTED] To: Gary [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, March 31, 2002 11:43 PM Subject: Re: [PHP] return Nope, that code makes no sense. $_POST is an array containing the POST variables.

Re: [PHP] return

2002-04-01 Thread Miguel Cruz
On Mon, 1 Apr 2002, Jordan K. Martin wrote: Makes sense. I didn't think much when writing that piece...but...what is the for? wouldn't it work the same without it? function test ($var) { $var = addslashes($var) } $foo = He's dreaming; test($foo); print($foo); If you don't

  1   2   >