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);
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:
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
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 -
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
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() {
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
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,
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).
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
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
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
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 ;)
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:
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]
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
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
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
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
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
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
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?
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
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,
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
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
[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
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.
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
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
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
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
# [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,
[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
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
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
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
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,
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
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
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[] =
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
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
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,
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
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
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 .
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... :-)
[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
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)
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:
[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
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 .
[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
~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
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
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]' .
, 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
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
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
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
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
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,
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
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
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
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
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
--- 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
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;
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
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
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
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.
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
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);
* 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:
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
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
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
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
-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
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
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
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
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
);
- 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
]]
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
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
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:
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
*
?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
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)
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
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
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
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,
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) ?
- 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.
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 - 100 of 125 matches
Mail list logo