Because the process im using is a php one i need to be able to input a .html file in a php file without using php aquire or php include is this possible i need something like Input:>"<?php echo $filenames[$num]; ?>" The <?php echo $filenames[$num]; ?> bit is the bit thats confilicting with the php include bit For example .... <?php include("<?php echo $filenames[$num]; ?>"); ?></td> The script above is what i need to work but because there is a php in a php it wont work ? Is there anyway around this ?????
I'm not a PHP guru by any stretch of the imagination, but doesn't echo basically print a statement onto the screen? If you're trying to dynamically generate a page name from an array, set a variable equal to $filenames[$num] and then use a simple include statement to call it - <?php $foo = $filenames[$num]; include $foo; ?> That might be wrong syntax (again, I've never written a line of PHP in my life), but the gist of it should be correct.
What PM said. You can't nest PHP inside PHP. Yuo are opening php <?php and then opening it again <?php. Not an option. Just do: <?php include($filenames[$num]); ?> PHP: