Jump to content

include file as a variable


goltoof

Recommended Posts

My catalog uses a template file to list product details.  One part of it is responsible for putting these details into nifty little tabs:

 

<?php
$template = '{magictabs style=black_rounded, tabwidth=110px}';
   $template .= 'Technical Specifications';
   $template .= '::';
   $template .= '<table colspan="3"><tr><td>';
   $template .= $details;
   $template .= '</td></tr></table>';
   $template .= '||||';
?>

 

I don't want it to output $details, I want it to output a separate script instead.

 

How do I include this separate file as a variable? I want this:

<?php include('specs.php'); ?>

to replace the $details variable.

Link to comment
https://forums.phpfreaks.com/topic/210492-include-file-as-a-variable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.