I am using this to place some repeated code onto my page from an external file:
<?php include_once("accordion_small.php"); ?>
I use this information twice on my page, but it is only showing the content at the first instance of this code.
How can I use this file twice in the same page?
Use
includeinstead ofinclude_once.include_oncewill, well, only include the script once. The second time you call it it will be ignored.Of course it goes to beg what is the content of that file? Is it code that just runs? You might consider making it a function and calling it twice but including it once.
This will allow better code reuse and speed up the processing time for this page. Plus if you need to use it more than twice, hey, just call it again without including it a third or fourth or etc time.