How to print \ in php. Only \ with out using . or *.
Answers were Sorted based on User's Feedback
Answer / vijay
The answer is simple.
<?php print "\\"; ?>
I hope this coud help u.
| Is This Answer Correct ? | 4 Yes | 3 No |
Answer / swarnadip
Previous answer is correct but u can also use echo in place
of print
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / naresh
$something = "oh something";
echo "My answer is \\\"is"\\\ $something" <br/>;
output:"My answer \"is" \ oh something
when we declare single \ it escaped but when we double the \
it will display the single \.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / gsrlingam
write like this
<?php print_r($varaible);?>
<?php echo $varaible;?>
<?php echo "String";?>
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / ram
i think the above answer is not correct.
i think this will work.
<?php print "\\";
| Is This Answer Correct ? | 0 Yes | 2 No |
How can I display text with a php script?
I am writing an application in php that outputs a printable version of driving directions. It contains some long sentences, and I am a neat freak, and would like to make sure that no line exceeds 50 characters. How do I accomplish that with php?
What is the string concatenation operator in php?
How can we create a database using PHP and mysql?
What is static variable in php?
What is $_ server request_method == post?
Explain different types of errors in PHP (i.e. arguments in errorreporting function)?
8 Answers Base2 Infotech, DCI, Microsoft, Tata Elxsi,
What are psrs?
Explain what is the function file_get_contents() usefull for?
What is difference between python and php?
what method is used to generate a random number?
Do while loops?