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 we extract string 'techinterviews.com' from a string 'http://www.techinterviews.com' using regular expression in PHP?
What is get and post method in php?
What is the difference between get & post ?
When viewing an html page in a browser, the browser often keeps this page in its cache. What can be possible advantages/disadvantages of page caching? How can you prevent caching of a certain page (please give several alternate solutions)?
Tell me how to retrieve a cookie value?
What is trait in php?
why did u want to leave your past organisation?
Is php a cms?
Why do we use csrf token?
Why do we need abstract class in php?
What is the use of header in php?
Tell me what should we do to be able to export data into an excel file?