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

What is the difference between unlink and unset ?

3 Answers  


How to get total number of elements used in array?

0 Answers  


What are the advantages of stored procedures in php?

0 Answers  


Explain soundex() and metaphone().

0 Answers  


What is php and what does it do?

0 Answers  






What is $this in php?

0 Answers  


What is Type hinting in PHP?

0 Answers  


Explain include(), include_once, require() and require_once?

0 Answers  


What is constructor and destructor?

0 Answers  


How do I escape data before storing it in the database?

0 Answers  


How to add different images in php program like a job site.......

2 Answers  


How do I update php?

0 Answers  






Categories