Re: [PHP] return

2002-04-01 Thread Erik Price
On Monday, April 1, 2002, at 02:13 PM, 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);

Re: [PHP] return

2002-03-31 Thread Rasmus Lerdorf
Nope, that code makes no sense. $_POST is an array containing the POST variables. You make a copy of that array an put it in $foo thereby overwriting the passed in $foo. Then you return $$foo which actually ends up returning a variable named $Array. It does not look like you have a $Array

Re: [PHP] return

2002-03-31 Thread eric.coleman
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. You make a copy of that array an put it in $foo thereby overwriting the passed in $foo

Re: [PHP] return

2002-03-31 Thread Jordan
est($foo); echo($foo); // echo's, Yes I\'am Very Awsome Understand? - 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.

Re: [PHP] return

2002-03-31 Thread Rasmus Lerdorf
March 31, 2002 11:43 PM Subject: Re: [PHP] return Nope, that code makes no sense. $_POST is an array containing the POST variables. You make a copy of that array an put it in $foo thereby overwriting the passed in $foo. Then you return $$foo which actually ends up returning a variab

Re: [PHP] return

2002-03-31 Thread Miguel Cruz
On Mon, 1 Apr 2002, Jordan wrote: Isnt there really no need for the 'return' though? Try this program and see what happens: ? function triple1($x) { $x = $x * 3; return $x; } function triple2($x) { $x = $x * 3; } function triple3($x) { global $x; $x = $x * 3; } $x = 5; $x =

Re: [PHP] return

2002-03-31 Thread Miguel Cruz
On Sun, 31 Mar 2002, Miguel Cruz wrote: On Mon, 1 Apr 2002, Jordan wrote: Isnt there really no need for the 'return' though? Try this program and see what happens: Ah, Rasmus brings up a good point. Try this one instead. ? function triple1($x) { $x = $x * 3; return $x; } function

Re: [PHP] return

2002-03-31 Thread jtjohnston
Gary, To add to the conversation ... You created a function to pass something through it, to process something and now you want to get something back, right? That's what return does. It gets something back for your effort. You could simply: echo addslashes($var); But let's say you do it a

Re: [PHP] Return the column names of MySQL table?

2002-03-19 Thread Geoff Hankerson
I believe it is: describe tablename; - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 19, 2002 4:43 PM Subject: [PHP] Return the column names of MySQL table? Forgive me for the off topic question. This is a MySQL question.. has

Re: [PHP] Return the column names of MySQL table?

2002-03-19 Thread Erik Price
On Tuesday, March 19, 2002, at 05:43 PM, Kevin Stone wrote: I simply need to return a list of column names of a MySQL table. What's the syntax to do that? SHOW COLUMNS FROM tablename; Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing

Re: [PHP] Return the column names of MySQL table?

2002-03-19 Thread J.F.Kishor
Hi, Try the following, ? mysql_connect(DBServer,DBUser,DBPassword); $queryColumn = mysql(DBName,desc tableName); $columnCount = //Find out the number of column in the table. $index=0; while($index $columnCount) { $columnName =

Re: [PHP] Return values from shell_exec command into db

2002-03-06 Thread Jason Wong
On Wednesday 06 March 2002 18:23, Sven Jacobs wrote: Hey I want to run a shell script, all the values that are returned normal by that script I want to put as var. For example tracert X.X.X.X 1 10 ms 10 ms 10 ms blablabla.bla.com [X.X.X.X] 2 10 ms10 ms10 ms

RE: [PHP] Return Adress

2001-08-09 Thread billfarr
Hey, there... I ran into this yesterday along with learning a heap more PHP. Adding a Reply-To: [EMAIL PROTECTED] header seemed to work fine. Hope this helps, Bill -Original Message- From: Jean-Arthur Silve [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 09, 2001 5:23 AM To: [EMAIL

Re: [PHP] Return Adress

2001-08-09 Thread Richard Lynch
://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: [EMAIL PROTECTED] Newsgroups: php.general To: [EMAIL PROTECTED] Sent: Thursday, August 09, 2001 11:27 AM Subject: RE: [PHP] Return Adress Hey, there... I ran into this yesterday

RE: [PHP] return value from recursive function

2001-07-29 Thread Dave
maybe it is just me and my preferred syntax/style... if ($i 4) { abc_recurse(); } return 'xyz'; # NOTICE REMOVED ()'s Did not look to closely at your shortcut symantics to verify legitimacy Also, unless I am mistaken, people generally advise against

RE: [PHP] return

2001-07-16 Thread Boget, Chris
Here's my code: ? function expDate($date) { $month = substr($date, 0, 2); $len = strlen($date); $year = substr($date, $len-2, $len); return $month; return $year; } expDate(11/2002); print $month $year; ? I know this isn't the correct usage of

RE: [PHP] return

2001-07-16 Thread Don Read
On 16-Jul-01 Tyler Longren wrote: Here's my code: ? function expDate($date) { $month = substr($date, 0, 2); $len = strlen($date); $year = substr($date, $len-2, $len); return $month; return $year; } expDate(11/2002); print $month $year; ? I

Re: [PHP] return

2001-07-16 Thread Alexander Skwar
So sprach »Tyler Longren« am 2001-07-16 um 15:25:08 -0500 : function? Currently, nothing is printed to the browser. No wonder, because you don't assign the returned value of expDate to anything.. well, if you want to return two values, I'd suggest to use an array, like so: function

Re: [PHP] return

2001-07-16 Thread Alexander Skwar
So sprach »Alexander 'Digital Projects' Skwar« am 2001-07-16 um 22:38:44 +0200 : anything.. correction: Whoops - there's a . missing anything... Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com |

Re: [PHP] return parse error

2001-04-13 Thread Jeffrey Paul
At 03:56 AM 4/13/2001, Peter Harkins wrote: This generates a parse error: mysql_connect("localhost", "root", "rootpw") or return("bar"); But all the following work fine: mysql_connect("localhost", "root", "rootpw") or die("bar");

Re: [PHP] return parse error

2001-04-13 Thread Yasuo Ohgaki
Small additional info about "expression" and "language construct". Expression is anything that have value. Therefore, if language construct returns value = valid expression. Following code works: ($val) ? include('abc.php') : include('def.php'); Following code does NOT work: ($val) ?

Re: [PHP] Return Image for PHP Link

2001-02-27 Thread Ron Wills
I'm not 100% sure this works, but maybe try something like this: img src="? include 'myphpcode.php'; ?>"> If that doesn't work, you can always have the php generate the entire tag ? $image = "myimagefile.gif"; // What ever you need print "img src=\"$image\">"; ?> Hope this helps :-) "Karl J.

Re: [PHP] Return ODBC Results to an array

2001-02-13 Thread Ifrim Sorin
You can use mysql_fetch_array() for each row returned in the cursor. Sorin Ifrim - Original Message - From: Karl J. Stubsjoen [EMAIL PROTECTED] To: PHP Mailing List [EMAIL PROTECTED] Sent: Tuesday, February 13, 2001 7:32 PM Subject: [PHP] Return ODBC Results to an array Is there a

Re: [PHP] Return ODBC Results to an array

2001-02-13 Thread Ifrim Sorin
For ODBC, the function is odbc_fetch_into(). Sorin Ifrim - Original Message - From: Karl J. Stubsjoen [EMAIL PROTECTED] To: PHP Mailing List [EMAIL PROTECTED] Sent: Tuesday, February 13, 2001 7:32 PM Subject: [PHP] Return ODBC Results to an array Is there a way to return the results

RE: [PHP] Return ODBC Results to an array

2001-02-13 Thread Andrew Hill
Karl, http://www.php.net/manual/en/function.odbc-fetch-into.php Best regards, Andrew -- Andrew Hill - OpenLink Software Director Technology Evangelism eBusiness Infrastructure Technology http://www.openlinksw.com -Original Message- From: Karl J.

<    1   2