my new defination is
$var="Tony said:"I like this game!""
It appeared that only
"Tony said:"
part can be recoginized, but I need the whole sentence. What can I do?
|
my new defination is
It appeared that only
part can be recoginized, but I need the whole sentence. What can I do? |
|||
|
|
|
http://ss64.com/ps/syntax-esc.html A simple solution is to just double the quotes. See the link for other options.
|
|||
|
|
|
Just for completness, alternative solutions are to use the escape character:
or "here strings" which are normally useful for multi-line texts but can be used for this case as well:
|
||||
|
|
|
Even easier: single quotes. You can put any number of double quotes in a single-quote string, or vice versa:
or
I personally think this is the easiest and most readable solution. |
|||||||
|