I have HTML content in the variable $detail
and I want to "embed" PHP files there.
Note: The variable "
$detail
" gets stores the information from a query to the database.
This variable $detail
has paragraphs "<p> </p>
" in those paragraphs I need to be able to "embed" PHP files, for example, in the second paragraph, embed "file1.php" the other file in the fifth paragraph.
It is important that it is in PHP
I had already done something similar but with JAVASCRIPT
but when the browser has JAVASCRIPT
debugging deactivated everything is out of order, that's why I'm looking for some way to use it with PHP
Example:
include 'file1.php';
include 'file2.php';
//They must be included or embedded in the $detail variable, the first file, in the third paragraph, and the second file, in the seventh paragraph
echo $detail;