Re: [PHP] Array to String

2006-06-28 Thread Jochem Maas
Richard Lynch wrote: > On Mon, June 26, 2006 2:06 am, Jochem Maas wrote: >>> if (!get_magic_quotes_gpc()) { >>> if (isset($_POST)) { >>> foreach ($_POST as $key => $value) { >>> $_POST[$key] = trim(addslashes($value)); >>> } >>> } >>> >>> if (isset($_GET))

Re: [PHP] Array to String

2006-06-27 Thread Richard Lynch
On Mon, June 26, 2006 2:06 am, Jochem Maas wrote: >> if (!get_magic_quotes_gpc()) { >> if (isset($_POST)) { >> foreach ($_POST as $key => $value) { >> $_POST[$key] = trim(addslashes($value)); >> } >> } >> >> if (isset($_GET)) { >> foreach ($_GET as

Re: [PHP] Array to String

2006-06-26 Thread Jochem Maas
weetat wrote: > Hi all, > > I have the error below in my PHP version 4.3.2: > > PHP Notice: Array to string conversion in /data/html/library/config.php > on line 45 > > If i have turned "on" the magic_quotes in php.ini, it is ok . > Any ideas? > > It cause by the code below: > > if (!get_ma

Re: [PHP] Array to String

2006-06-25 Thread Chris
You are probably passing some variables into POST or GET using the array notation: /mypage.php?var[]=fred&var[]=wilma $_GET['var'] will be an array inside mypage.php, You should probably check to see if it's an array then, if it is, loop through each element of the var array Chris weetat w

[PHP] Array to String

2006-06-25 Thread weetat
Hi all, I have the error below in my PHP version 4.3.2: PHP Notice: Array to string conversion in /data/html/library/config.php on line 45 If i have turned "on" the magic_quotes in php.ini, it is ok . Any ideas? It cause by the code below: if (!get_magic_quotes_gpc()) { if (isset($_P

RE: [PHP] Array to String conversion error

2004-03-16 Thread Alex Hogan
> $row is an entire array. you don't explode an entire array, you only > explode the contents of an element of an array. > > print_r($row) will give you some clues. > > you'll need to access a specific element within the array. like: > > $thearray = explode('__', $row[0][0]); That was it... Tha

RE: [PHP] Array to String conversion error

2004-03-16 Thread Chris W. Parker
Alex Hogan on Tuesday, March 16, 2004 9:48 AM said: > $row = mssql_fetch_array($result); > > $thearray = explode('__', $row); - This is line 40 $row is an entire array. you don't explode an entire array, you only explode the contents of an e

[PHP] Array to String conversion error

2004-03-16 Thread Alex Hogan
Hi All, I have a function that gets a single field from a mssql db. That field contains data that is then parsed out to represent a survey's results. The function; function quesresults(){ $query = "SELECT sur_ans FROM au_survey"; $result = MSSQL_QU

Re: [PHP] Array to string?

2003-10-14 Thread Douglas Douglas
I just found it: implode. Sorry to bother you. __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Array to string?

2003-10-14 Thread Douglas Douglas
Hello everybody. Is there any built-in function to convert an array to string? Thanks. __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: htt

Re: [PHP] array to string

2001-10-19 Thread R'twick Niceorgaw
can change the $fupdatecontents .=$value; line to $fupdatecontents .=$value."\n"; HTH R'twick - Original Message - From: "René Fournier" <[EMAIL PROTECTED]> To: "Php-General" <[EMAIL PROTECTED]> Sent: Friday, October 19, 2001 12:05 PM Subject

Re: [PHP] array to string

2001-10-19 Thread Steve Werby
"René Fournier" <[EMAIL PROTECTED]> wrote: > Just trying to convert an array to string before writing the whole thing > back out to a file. (Trying to do a simple database-less database, using > text files). > > $fcontents = file($name.".db"); // THE ENTIRE TABLE > $fcontents[$update] = $updated

[PHP] array to string

2001-10-19 Thread René Fournier
Just trying to convert an array to string before writing the whole thing back out to a file. (Trying to do a simple database-less database, using text files). $fcontents = file($name.".db"); // THE ENTIRE TABLE $fcontents[$update] = $updatedstring; // THE ROW TO BE UPDATED