Hi guys ![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
I have this :
Why isn't the imploded variable in the db?
Is a copy of $_POST["my_var"] made in the process?
Thanks for the help![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
I have this :
Code:
<input type="text" name="my_var[]" value="1" />
<input type="text" name="my_var[]" value="2" />
<input type="text" name="my_var[]" value="3" />
.
.
.
Form is submitted
.
.
.
$_POST["my_var"] = implode(",", $_POST["my_var"]);
.
.
.
echo $_POST["my_var"]; // value is string "1,2,3"
.
.
.
store_post_vars_in_db(); // this function takes $_POST vars and store them in the db
.
.
.
// stored value is an array but not a string !!!
Why isn't the imploded variable in the db?
Is a copy of $_POST["my_var"] made in the process?
Thanks for the help