How do I put quotation marks within a text object?

Hello all, relatively new developer here. 

I am trying to put a quotation mark inside of a text object, but it does not seem to be working, since the text displayed is already in quotes. Below is my code. As you can see I have three text objects for the three lines of text I want to display. On screen, I want the first line to read exactly: “Time flies like an arrow. I want the second line to read exactly: Fruit flies like a banana.” Basically it is one quotation on two lines.

local text1 = display.newText(“Time flies like an arrow”, display.contentCenterX, display.contentHeight*0.2, “Comic Sans MS”, 50)

YEET:setFillColor(0.75,0,0)

local text2 = display.newText(“Fruit flies like a banana”, display.contentCenterX, display.contentHeight*0.8, “Comic Sans MS”, 50)

YEET2:setFillColor(0.75,0,0)

Thank you in advance for helping me out!

-Jack

Hi Jack,

The best way is to use the “trick” of surrounding the string with single quotes, so the double quotes are regarded as part of the string, not what surrounds the string. So like this:

[lua]

local text1 = display.newText(’“Time flies like an arrow”’ …

[/lua]

Hope this helps,

Brent

Hi Jack,

The best way is to use the “trick” of surrounding the string with single quotes, so the double quotes are regarded as part of the string, not what surrounds the string. So like this:

[lua]

local text1 = display.newText(’“Time flies like an arrow”’ …

[/lua]

Hope this helps,

Brent