Hello,
php.net manual is a good reading about it,
$new_string= $POST['firstname'] ." ". $POST['lastname'] ;
use the . to link the two array and the space...
To cut the writing before use the $_POST, you could short them.
$fn=$POST['firstname'];
$ln= $POST['lastname'];
$new_string="$fn $ln";
as you can see, simple fill them as a string.
if i'm not mistaken, u could use it like this:
$string="the firstname is{$POST['firstname']} and {$POST['lastname']} is lastname";
test them before use 🙂
jjozsi
phpcode.hu
pantteri;10889519 wrote:Thanks for the replies! Oh, the solutions were simpler than I thought. I´m a newbie...
So I figured that $POST['firstname'] . $POST['lastname'] will give me the whole name. But how do I get a space between the first and the last names?