Can anyone explain how to make this code work?
echo \'Welcome \'
echo "Welcome ".$_SESSION['username']."";
or
echo 'Welcome '.$_SESSION['username'].'';
Quick Explain :
PHP is even smart enough to detect variables inside a PHP string and evaluate them :
$variablename = "Andrew";
echo "Hello $variablename, welcome ";
=> Hello Andrew, welcome
More infos : PHP.net - echo