I'm new to php and trying to create a simple script.. but I don't know if what i'm trying to do is possible with ob_start() please let me know, thanks. here is my code:
<?php
ob_start();
if($mystuff !== 0) { foreach($mystuff['sirf7alk'] as $mystuff) {
?>
<?php include('header.php'); ?>
App name: <?php echo $mystuff->app; ?>
<?php include('footer.php');?>
<?php
} }
file_put_contents('page.php', ob_get_contents());
?>
that's what my code outputs:
my header content
App name: My app name
my footer content
here is what i want to achieve:
<?php include('header.php'); ?>
App name: My app name
<?php include('footer.php');?>