- Joined
- Apr 28, 2005
- Messages
- 6,953
- Reaction score
- 2,420
Maybe lighten up a bit? I get this message 2 or 3 times a day.
Attachments
You must be registered for see attachments list
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!I've only received this once in an eternity. Is my usergroup not included in this?
This happens to me on every thread/post I do with PHP code in, pisses me off.
[COLOR=#000000] [COLOR=#0000BB]<?php
[/COLOR][COLOR=#007700]echo [/COLOR][COLOR=#DD0000]"Hello World"[/COLOR][COLOR=#007700];
echo [/COLOR][COLOR=#DD0000]"This spans
multiple lines. The newlines will be
output as well"[/COLOR][COLOR=#007700];
echo [/COLOR][COLOR=#DD0000]"This spans\nmultiple lines. The newlines will be\noutput as well."[/COLOR][COLOR=#007700];
echo [/COLOR][COLOR=#DD0000]"Escaping characters is done \"Like this\"."[/COLOR][COLOR=#007700];
[/COLOR][COLOR=#FF8000]// You can use variables inside of an echo statement
[/COLOR][COLOR=#0000BB]$foo [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#DD0000]"foobar"[/COLOR][COLOR=#007700];
[/COLOR][COLOR=#0000BB]$bar [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#DD0000]"barbaz"[/COLOR][COLOR=#007700];
echo [/COLOR][COLOR=#DD0000]"foo is [/COLOR][COLOR=#0000BB]$foo[/COLOR][COLOR=#DD0000]"[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]// foo is foobar
// You can also use arrays
[/COLOR][COLOR=#0000BB]$baz [/COLOR][COLOR=#007700]= array([/COLOR][COLOR=#DD0000]"value" [/COLOR][COLOR=#007700]=> [/COLOR][COLOR=#DD0000]"foo"[/COLOR][COLOR=#007700]);
echo [/COLOR][COLOR=#DD0000]"this is [/COLOR][COLOR=#007700]{[/COLOR][COLOR=#0000BB]$baz[/COLOR][COLOR=#007700][[/COLOR][COLOR=#DD0000]'value'[/COLOR][COLOR=#007700]]}[/COLOR][COLOR=#DD0000] !"[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]// this is foo !
// Using single quotes will print the variable name, not the value
[/COLOR][COLOR=#007700]echo [/COLOR][COLOR=#DD0000]'foo is $foo'[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]// foo is $foo
// If you are not using any other characters, you can just echo variables
[/COLOR][COLOR=#007700]echo [/COLOR][COLOR=#0000BB]$foo[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]// foobar
[/COLOR][COLOR=#007700]echo [/COLOR][COLOR=#0000BB]$foo[/COLOR][COLOR=#007700],[/COLOR][COLOR=#0000BB]$bar[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]// foobarbarbaz
// Some people prefer passing multiple parameters to echo over concatenation.
[/COLOR][COLOR=#007700]echo [/COLOR][COLOR=#DD0000]'This '[/COLOR][COLOR=#007700], [/COLOR][COLOR=#DD0000]'string '[/COLOR][COLOR=#007700], [/COLOR][COLOR=#DD0000]'was '[/COLOR][COLOR=#007700], [/COLOR][COLOR=#DD0000]'made '[/COLOR][COLOR=#007700], [/COLOR][COLOR=#DD0000]'with multiple parameters.'[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]chr[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]10[/COLOR][COLOR=#007700]);
echo [/COLOR][COLOR=#DD0000]'This ' [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#DD0000]'string ' [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#DD0000]'was ' [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#DD0000]'made ' [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#DD0000]'with concatenation.' [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#DD0000]"\n"[/COLOR][COLOR=#007700];
echo <<<END
[/COLOR][COLOR=#DD0000]This uses the "here document" syntax to output
multiple lines with [/COLOR][COLOR=#0000BB]$variable[/COLOR][COLOR=#DD0000] interpolation. Note
that the here document terminator must appear on a
line with just a semicolon. no extra whitespace!
[/COLOR][COLOR=#007700]END;
[/COLOR][COLOR=#FF8000]// Because echo does not behave like a function, the following code is invalid.
[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$some_var[/COLOR][COLOR=#007700]) ? echo [/COLOR][COLOR=#DD0000]'true' [/COLOR][COLOR=#007700]: echo [/COLOR][COLOR=#DD0000]'false'[/COLOR][COLOR=#007700];
[/COLOR][COLOR=#FF8000]// However, the following examples will work:
[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$some_var[/COLOR][COLOR=#007700]) ? print [/COLOR][COLOR=#DD0000]'true' [/COLOR][COLOR=#007700]: print [/COLOR][COLOR=#DD0000]'false'[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]// print is also a construct, but
// it behaves like a function, so
// it may be used in this context.
[/COLOR][COLOR=#007700]echo [/COLOR][COLOR=#0000BB]$some_var [/COLOR][COLOR=#007700]? [/COLOR][COLOR=#DD0000]'true'[/COLOR][COLOR=#007700]: [/COLOR][COLOR=#DD0000]'false'[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]// changing the statement around
[/COLOR][COLOR=#0000BB]?>
Testing;You must be registered to see links
[/COLOR] [/COLOR]Code:[COLOR=#000000] [COLOR=#0000BB]<?php [/COLOR][COLOR=#007700]echo [/COLOR][COLOR=#DD0000]"Hello World"[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#DD0000]"This spans multiple lines. The newlines will be output as well"[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#DD0000]"This spans\nmultiple lines. The newlines will be\noutput as well."[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#DD0000]"Escaping characters is done \"Like this\"."[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]// You can use variables inside of an echo statement [/COLOR][COLOR=#0000BB]$foo [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#DD0000]"foobar"[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#0000BB]$bar [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#DD0000]"barbaz"[/COLOR][COLOR=#007700]; echo [/COLOR][COLOR=#DD0000]"foo is [/COLOR][COLOR=#0000BB]$foo[/COLOR][COLOR=#DD0000]"[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]// foo is foobar // You can also use arrays [/COLOR][COLOR=#0000BB]$baz [/COLOR][COLOR=#007700]= array([/COLOR][COLOR=#DD0000]"value" [/COLOR][COLOR=#007700]=> [/COLOR][COLOR=#DD0000]"foo"[/COLOR][COLOR=#007700]); echo [/COLOR][COLOR=#DD0000]"this is [/COLOR][COLOR=#007700]{[/COLOR][COLOR=#0000BB]$baz[/COLOR][COLOR=#007700][[/COLOR][COLOR=#DD0000]'value'[/COLOR][COLOR=#007700]]}[/COLOR][COLOR=#DD0000] !"[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]// this is foo ! // Using single quotes will print the variable name, not the value [/COLOR][COLOR=#007700]echo [/COLOR][COLOR=#DD0000]'foo is $foo'[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]// foo is $foo // If you are not using any other characters, you can just echo variables [/COLOR][COLOR=#007700]echo [/COLOR][COLOR=#0000BB]$foo[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]// foobar [/COLOR][COLOR=#007700]echo [/COLOR][COLOR=#0000BB]$foo[/COLOR][COLOR=#007700],[/COLOR][COLOR=#0000BB]$bar[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]// foobarbarbaz // Some people prefer passing multiple parameters to echo over concatenation. [/COLOR][COLOR=#007700]echo [/COLOR][COLOR=#DD0000]'This '[/COLOR][COLOR=#007700], [/COLOR][COLOR=#DD0000]'string '[/COLOR][COLOR=#007700], [/COLOR][COLOR=#DD0000]'was '[/COLOR][COLOR=#007700], [/COLOR][COLOR=#DD0000]'made '[/COLOR][COLOR=#007700], [/COLOR][COLOR=#DD0000]'with multiple parameters.'[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]chr[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]10[/COLOR][COLOR=#007700]); echo [/COLOR][COLOR=#DD0000]'This ' [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#DD0000]'string ' [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#DD0000]'was ' [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#DD0000]'made ' [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#DD0000]'with concatenation.' [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#DD0000]"\n"[/COLOR][COLOR=#007700]; echo <<<END [/COLOR][COLOR=#DD0000]This uses the "here document" syntax to output multiple lines with [/COLOR][COLOR=#0000BB]$variable[/COLOR][COLOR=#DD0000] interpolation. Note that the here document terminator must appear on a line with just a semicolon. no extra whitespace! [/COLOR][COLOR=#007700]END; [/COLOR][COLOR=#FF8000]// Because echo does not behave like a function, the following code is invalid. [/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$some_var[/COLOR][COLOR=#007700]) ? echo [/COLOR][COLOR=#DD0000]'true' [/COLOR][COLOR=#007700]: echo [/COLOR][COLOR=#DD0000]'false'[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]// However, the following examples will work: [/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$some_var[/COLOR][COLOR=#007700]) ? print [/COLOR][COLOR=#DD0000]'true' [/COLOR][COLOR=#007700]: print [/COLOR][COLOR=#DD0000]'false'[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]// print is also a construct, but // it behaves like a function, so // it may be used in this context. [/COLOR][COLOR=#007700]echo [/COLOR][COLOR=#0000BB]$some_var [/COLOR][COLOR=#007700]? [/COLOR][COLOR=#DD0000]'true'[/COLOR][COLOR=#007700]: [/COLOR][COLOR=#DD0000]'false'[/COLOR][COLOR=#007700]; [/COLOR][COLOR=#FF8000]// changing the statement around [/COLOR][COLOR=#0000BB]?>
Worked fine when wrapped in code.
can try this but code seems to work