Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Echo statement in an include

 

 


loccom
User

Jan 7, 2012, 9:19 AM

Post #1 of 3 (283 views)
Shortcut
Echo statement in an include Can't Post

I am pretty newish to php, basics i don;t have a problem with, but i seem to be stuck on something thats probably really easy.

I am looking to echo a word from CMSB into an include.

ie

Code
<? include("blah.inc.php"); ?>


The file name "blah" i wish to echo an entry from the database but I am unable to echo this into the include.

Below will obviosuly wont work, but how can i make an entry automatically enter the right word in to my include?


Code
<? include("<?php echo $blahRecord['blah_word'].inc.php?>"); ?>



Dave
Staff / Moderator


Jan 7, 2012, 11:40 AM

Post #2 of 3 (277 views)
Shortcut
Re: [loccom] Echo statement in an include [In reply to] Can't Post

Hi loccom,

Try this:


Code
<?php include( $blahRecord['blah_word'] . ".inc.php" ); ?>


Let me know if that works for you.

Dave Edis - Senior Developer
interactivetools.com
 


loccom
User

Jan 7, 2012, 2:02 PM

Post #3 of 3 (272 views)
Shortcut
Re: [Dave] Echo statement in an include [In reply to] Can't Post

Perfect dave.. thank you

As always excellent Support you guys have given me over the last 12 years!