strings Flashcards

1
Q

what character is used to concatenate strings?

A

the period ( . )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

$msgs = 5;

echo “You have “ . $msgs . “ messages.”;

A

output: You have 5 messages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

to add value to a string variable

A

$bulletin .= $newsflash;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly