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 to convert a json string to an array in php?
What is difference between get and post?
What is the use of trim in php?
How many records can be stored in mysql table?
Is php better than java?
What is session management php?
In PHP, fgets() is used to read a file one line at a time. State Whether True or False?
What does $globals mean?
Tell me what is the use of the function htmlentities?
What are the features of php 7?
Explain me how to include a file to a php page?
what is the default session expire time in php? what is default file attachment size in mail in php?