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 |
Suppose your Zend engine supports the mode <? ?> Then how can u configure your PHP Zend engine to support <?PHP ?> mode ?
What is the difference between mysql_fetch_object and mysql_fetch_array?
What are magic methods in php
What is "echo" in php?
What difference between require() and require_once()?
What is the use of namespace in php?
How to concatenate two strings in php?
what are the rules to be followed at the time of declaring a variable?,what is the purpose of var_dump()function in php,syntax of ternary operator()in php,difference between drop a table and truncate a table...
How we can retrieve the data in the result set of mysql using php?
How can we access the data sent through the url with the post method?
Write a program to get lcm of two numbers using php?
Explain why would we use === instead of ==?