tags:

views:

67

answers:

4

How can i echo " i mean if i want to show: "Patrik", i would do:

<?php echo " "Patrik" "; ?>

but as you know you cant do this

+10  A: 

Escape double quotes with \ when full string itself is in double quotes:

<?php echo " \"Patrik\" "; ?>

Or:

<?php echo ' "Patrik" '; ?>

More Info:

Sarfraz
+3  A: 
<?php echo '"Patrik"'; ?> or.. <?php echo "\"Patrik\""; ?>
Jurassic_C
+2  A: 
<?
 echo " \"Patrik\" ";
// or
 echo '"Patrick"';

?>

a1ex07
+1  A: 

if it's HTML or XML, you can use &#34; as substitute for the double-quote.

stillstanding