php not honoring newline

101 views Asked by At

I am running php 5.4.16 on CentOS7. I am trying to create a multiline file. According to the php syntax I have it correct, but it does not honor the newline. Right now I am going back to basic and just using the example on the php site, and it still does not work. What am I missing? https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc

my output is : My name is "MyName". I am printing some Foo.Now, I am printing some Bar2.This should print a capital 'A': A

 echo <<<EOT
    My name is "$name". I am printing some $foo->foo.
    Now, I am printing some {$foo->bar[1]}.
    This should print a capital 'A': \x41
    EOT;
    ?>
0

There are 0 answers