Reply to Re: "Array to String Conversion" error when constructing a multi-dimensional array

Your name:

Reply:


Posted by Rik on 01/19/07 13:15

drako wrote:
> OK,
>
> Here is the code in its entireity:
>
> [It is wrapped around an IF statement to process upon a certain
> condition].
>
> if($_POST['increment'] == 1) {
>
> $x = 0;
>
> if(isset($_SESSION["increment"])) {$x =
> count($_SESSION["increment"]);}
>
>
> $_SESSION["increment"][$x] = array("increment_bond" =>
> $_POST["increment_bond"],
> "increment_amount" => $_POST["increment_amount"],
> "increment_comm_date1" => $_POST["increment_comm_date1"],
> "increment_comm_date2" => $_POST["increment_comm_date2"],
> "increment_comm_date3" => $_POST["increment_comm_date3"]);
>
>
> }

Is your $_SESSION['increment'] accessed/altered anywhere else in the
script? Check for it.
Also, add this before "if($_POST['increment'] == 1)":

if(isset($_SESSION['increment'])) var_dump($_SESSION['incremenet']);

Most likely, you overwrite the $_SESSION['increment'] somewhere else in
your code, so it get's cast to a string. Check your code for every
'$_SESSION['increment']= ', and carefully consider the return of the
function after it...
--
Rik Wasmus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация