Whats this called?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
DuFF
Forum Contributor
Posts: 495
Joined: Tue Jun 24, 2003 7:49 pm
Location: USA

Whats this called?

Post 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.)
User avatar
Sevengraff
Forum Contributor
Posts: 232
Joined: Thu Apr 25, 2002 9:34 pm
Location: California USA
Contact:

Post by Sevengraff »

That bit you posted there needs a dot before the $year.

I'm not sure what it's called though.
Galahad
Forum Contributor
Posts: 111
Joined: Fri Jun 14, 2002 5:50 pm

Post by Galahad »

It's called concatenating strings. Look here for a little bit about it.
User avatar
DuFF
Forum Contributor
Posts: 495
Joined: Tue Jun 24, 2003 7:49 pm
Location: USA

Post by DuFF »

Thanks for the quick replies. :)
Post Reply