strings Flashcards
1
Q
what character is used to concatenate strings?
A
the period ( . )
2
Q
$msgs = 5;
echo “You have “ . $msgs . “ messages.”;
A
output: You have 5 messages.
3
Q
to add value to a string variable
A
$bulletin .= $newsflash;
4
Q
heredoc
A
«<_END …multiline block here… _END;
(END can be replaced with any tag prefaced with an underscore, i.e. _SECTION1, _OUTPUT, etc.
5
Q
constants
A
define(“ROOT_LOCATION”, “/usr/local/www/”);
*Constants do not have to be prefaced with a $ and must be defined with the define function