How to print \ in php. Only \ with out using . or *.

Answers were Sorted based on User's Feedback



How to print \ in php. Only \ with out using . or *...

Answer / vijay

The answer is simple.

<?php print "\\"; ?>

I hope this coud help u.

Is This Answer Correct ?    4 Yes 3 No

How to print \ in php. Only \ with out using . or *...

Answer / swarnadip

Previous answer is correct but u can also use echo in place
of print

Is This Answer Correct ?    2 Yes 1 No

How to print \ in php. Only \ with out using . or *...

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

How to print \ in php. Only \ with out using . or *...

Answer / malli

<?php echo "/"; ?>

Is This Answer Correct ?    0 Yes 0 No

How to print \ in php. Only \ with out using . or *...

Answer / gsrlingam

write like this
<?php print_r($varaible);?>
<?php echo $varaible;?>
<?php echo "String";?>

Is This Answer Correct ?    0 Yes 1 No

How to print \ in php. Only \ with out using . or *...

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 print \ in php. Only \ with out using . or *...

Answer / vikas

<?php echo "\"?>

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More PHP Interview Questions

Is php deprecated?

0 Answers  


how do we can copy of the content of a web page with the help og the URL and display them onto any other page

5 Answers  


how to change the div background color on every refresh..guys can u help me out.

3 Answers  


Is there any way to call a JAVASCRIPT function in PHP in AJAX

4 Answers  


Can I learn php in a month?

0 Answers  






What is the use of friend function?

7 Answers   Wipro,


Is php a strongly typed language?

0 Answers  


What are different types of Print Functions available in PHP?

0 Answers  


Name some of the functions in php.

0 Answers  


Does php have a future?

0 Answers  


How to Pass JSON Data in a URL using CURL in PHP?

0 Answers  


What is htaccess?

1 Answers  


Categories