Jump to content

[SOLVED] concatenate text and variables in php


kevinritt

Recommended Posts

A few ways:

echo 'Hello, ' .$_SESSION['username']. 'it is ' .date('F j, Y'). 'and the time is ' .date('H:i:s');

echo 'Hello, ',$_SESSION['username'],'it is ',date('F j, Y'),'and the time is ',date('H:i:s');

echo "Hello, {$_SESSION['username']} it is ".date('F j, Y')."and the time is ".date('H:i:s');

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.