Page 1 of 1

Whats this called?

Posted: Fri Jun 27, 2003 6:14 pm
by DuFF
Hey guys,
I have been learning PHP for last 2 weeks and playing around with it. Lately I have come across examples and used stuff that looks like this:

Code: Select all

<?php
$uploaddir = $_SERVER['DOCUMENT_ROOT'] . $category."/";
?>
That combines all the stuff using periods and places it into one variable. That is what I'm trying to do but I can't find out what it is called or any documentation on it. Could anyone please point me to a link that could help me learn about this? Thanks.

BTW, heres what I'm trying to do.

Code: Select all

<?php
$newdate=$month." ".$day.", "$year;
?>
Which I was hoping it would display something like "January 01, 2003". (I'm trying to reformat the date stored in MySQL.)

Posted: Fri Jun 27, 2003 6:21 pm
by Sevengraff
That bit you posted there needs a dot before the $year.

I'm not sure what it's called though.

Posted: Fri Jun 27, 2003 6:21 pm
by Galahad
It's called concatenating strings. Look here for a little bit about it.

Posted: Fri Jun 27, 2003 6:24 pm
by DuFF
Thanks for the quick replies. :)