Well,
$xml = "l
vv";
Works.
You can also use the following:
$xml = "l\nvv";
or
$xml = <<<XML
l
vv
XML;
Edit based on comment:
You can concatenate strings using the .=
operator.
$str = "Hello";
$str .= " World";
echo $str; //Will echo out "Hello World";
More Related Contents:
- How can I combine two strings together in PHP?
- How do I replace certain parts of my string?
- Truncate a string to first n characters of a string and add three dots if any characters are removed
- What kind of string is this? How do I unserialize this string? [duplicate]
- How to generate all permutations of a string in PHP?
- Remove multiple whitespaces
- Get PHP class property by string
- php String Concatenation, Performance
- PHP convert string to hex and hex to string
- Converting an integer to a string in PHP
- How to convert string to boolean php
- PHP substring extraction. Get the string before the first ‘/’ or the whole string
- How to create a random string using PHP?
- Is a new line = \n OR \r\n?
- Title case a string containing one or more last names while handling names with apostrophes
- Php – regular expression to check if the string has chinese chars
- How to get first x chars from a string, without cutting off the last word?
- Find first character that is different between two strings
- How to convert a string to JSON object in PHP
- PHP: Split multibyte string (word) into separate characters
- What does the b in front of string literals do?
- Highlight keywords in a paragraph
- Search and replace multiple values with multiple/different values in PHP5?
- Explode string into array with no empty elements?
- Get the sum of all digits in a numeric string
- Close open HTML tags in a string
- Reverse the letters in each word of a string
- How to separate letters and digits from a string in php
- How does PHP compare strings with comparison operators?
- Limit String Length