Caesar War
01-04-2003, 01:57 PM
I decided to finally learn php and so I installed both apache and php on my laptop computer (laptop runs under XP) and run it as a server so i could go and do stuff.
I was going through the ol hello world stuff and everything was going fine until i got to the special characters part
if I go and do this
<?php
echo "Hi my name is \nCaesar";
?>
it is supposed to output this:
Hi my name is
Caesar
right ??
but it's not doing it ! what is actually shows is:
Hi my name is Caesar <-- without the newline
however when i view the source on explorer it does shows like it is supposed to (with the newline thing)
same thing happens with \r and \t
doesnt happen with the other special chars... if I go and do this
echo "Hi my name is \$Caesar";
it does indeed shows
Hi my name is $Caesar
so... can somebody help me ? :confused:
I was going through the ol hello world stuff and everything was going fine until i got to the special characters part
if I go and do this
<?php
echo "Hi my name is \nCaesar";
?>
it is supposed to output this:
Hi my name is
Caesar
right ??
but it's not doing it ! what is actually shows is:
Hi my name is Caesar <-- without the newline
however when i view the source on explorer it does shows like it is supposed to (with the newline thing)
same thing happens with \r and \t
doesnt happen with the other special chars... if I go and do this
echo "Hi my name is \$Caesar";
it does indeed shows
Hi my name is $Caesar
so... can somebody help me ? :confused: