ok, so I have a bit of an odd situation:
I have three php documents: names.php, project_data.php, and template.php.
What I’m trying to do is echo the contents of a div in names.php into a div in project_data.php, and then echo that content again into template.php.
In order echo the contents of a specific div, I’m using this php:
<?php
$content = file_get_contents('FILE LOCATION');
$first_step = explode( '<div id="DIV ID">' , $content );
$second_step = explode("</div>" , $first_step[1] );
echo $second_step[0];
?>
The content from names.php is being successfully echoed into project_data.php. The issue is that when I try to echo that content from project_data.php into template.php, the literal php code gets echoed out instead of the content.
Its like when I’m looking at template.php, the php in project_data.php isn’t running and it’s just being treated like a text string or something? Maybe
explode()
has something to do with it?