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 |
What are the reasons for selecting lamp (linux, apache, mysql, PHP) instead of combination of other software programmes, servers and operating systems?
What are the different functions in sorting an array?
Why echo is faster than print in php?
"$this" what type of object it is?
what is the difference between GET,POST and REQUEST in php
What is php and features of php?
What is $_session in php?
Is laravel an oop?
How can we submit a form without a submit button?
23 Answers ABC, HCL, Infosys, Kept Bug, Panys, Rushmore Consultancy, Torque Infotech, Wipro, zCon Solutions,
What is the purpose of the following files having extensions 1) .frm 2) .myd 3) .myi? What do these files contain?
How to create an empty array in php?
write a program to print [123] [456] [789] note : braces also need to be printed