Jump to content

How to include " and ? inside echo


Recommended Posts

Hi,

 

i just want to know how to include " and ? inside echo

 

how do i echo following  php code using php

 

<?php

$con = mysql_connect("localhost","forum","password");

mysql_close($con)

?>

 

What i came up with is

echo "<?php";";

echo "$con = mysql_connect("localhost","forum","password");";

echo "mysql_close($con)";

echo "?> ";

 

but it doesn't work

 

 

Link to comment
https://forums.phpfreaks.com/topic/207920-how-to-include-and-inside-echo/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.