Imprimir PHP variable

// String
$myvar = "Jareer";
echo $myvar;

// Json
$json = [
"Name"=> "Jareer"
];
echo json_encode($json);
Undefined