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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is echo a function in php?

501


How to remove the new line character from the end of a text line in php?

521


What is magic quotes?

598


What is the difference between $message and $$message in php?

420


What difference between require() and require_once()?

548






Tell me how to execute an sql query? How to fetch its result?

489


Is php case sensitive?

506


What is the super method?

550


How to delete a file from the system?

566


What are the differences between PHP3 and PHP4 and PHP5? what is the current stable version of PHP?

615


How to get the total number of values in an array?

516


Explain the advantages of using PHP?

545


How to get no. of rows using MYSQL function?

556


How do I display php errors?

509


How to check an element is exists in array or not in php?

569