i am trying to print " in echo statement.
i can't get any method other than

echo " " ";

which is definitely wrong.
help me to find a way out of it.
any help is appreciated.

Recommended Answers

All 3 Replies

try using single qoute for the double quotes and double quoutes for the single quotes. Otherwise, yo can escape it. Another alternative is to use heredoc for a longer string., but for your situation something like this will do..
echo '"';
echo "' '";

Member Avatar

You need to escape the double quote with a backslash:

echo " \" ";

thanks for your response.
i will keep that in mindand use it in future.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.