Jump to content

add php to a file


adamriley

Recommended Posts

hi just a quick question i know that you can do this

 

<?php
$a1 = <<<html 
<html>
<head>
<title>example</title>
ect
html;

which enters into a file what i want to know how to put php for example

 

<?php
$a1 = "adam r"
$a2 = <<<phpcode
<?php
$3 = "$a1";
?>
phpcode;
?>

ect which would also enter into a file but this would just enter "adam r" but what i would like it to enter

"<?php
$a3 = "adam r"
?>"

 

 

p.s i know that the codes above wil not enter anything into a file but it is an example

Link to comment
https://forums.phpfreaks.com/topic/194047-add-php-to-a-file/
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.