We help IT Professionals succeed at work.

php include htm file in a php echo statememt?

derekstattin asked
Medium Priority
Last Modified: 2010-07-27
I would like to include a php include in  a block of code, and I am not sure how to do so.

echo '
        <div id = "bkg">
        <div class="content" style="width:800px;">
 <div class="main_register" style="width:590px;" >
I want to add the include file here. I have tried a few different ways but I can't get it to work
ed. <? include('header.htm'); ?>
        <form enctype="multipart/form-data" method="post">
                Maximum accepted filesize is '.(intval($maxsize/1024)).' KB.<br>
        You can upload only JPG and PNG pics<br><br>
        Photo Name:<br><input name="update_photo_title" type="text" size="20"><br>

...some form unputs...

Watch Question

Just break up your echo.

echo "start echoing stuff here before the include";
echo "continue echoeing the rest here";

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.