Anyone, help,... And of course THANK YOU
3 textfields (several words inside) - make 1 PHP variable ??
Moderator: General Moderators
3 textfields (several words inside) - make 1 PHP variable ??
If I have 3 textfields in a form named: tf1, tf2 and tf3, and user inserts some words inside each (lets say 3 or more), whats the PHP code to make all 3 textfields, all words inside - together to be inserted in one MySQL field, NOTE Sql code I know how to write, if all those ex. 9 words can be represented as one variable...
Anyone, help,... And of course THANK YOU
Anyone, help,... And of course THANK YOU
Code: Select all
<?php
$together = $field1.$field2.field3;
// you can also do
$together = "$field1 $field2 field3";
//or implode them
$fields = array ($field1, $field2, $field3);
$separator = "||"; //separe each piece with two |'s
$together = implode($separator, $array)
?>