Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8623413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:16:28+00:00 2026-06-12T07:16:28+00:00

Im referencing the PHP manual but Im getting a syntax error due to the

  • 0

Im referencing the PHP manual but Im getting a syntax error due to the early closing php tag-Obviously Im a newb to php but Im only attempting to assign the xml as a php string. Whats the problem here?

<?php
$xmlstr = <<<XML //Need a clarification on '<<<XML' if possible 
<?xml version='1.0' standalone='yes'?> //This is closing my php script and causing error
<details>
<detail>
    <user>mcgraw</user>
    <dateA>09/11/1973</dateA>
    <inTime>9:00am</inTime>
    <outTime>6:00pm</outTime>
    <hours>9</hours>
    <notes>Monday</notes>
</detail>
<detail>
    <user>simpson</user>
    <dateA>08/23/1983</dateA>
    <inTime>9:00am</inTime>
    <outTime>5:30pm</outTime>
    <hours>8.5</hours>
    <notes>Thursday</notes>
</detail>
</details>
XML;
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:16:29+00:00Added an answer on June 12, 2026 at 7:16 am

    That is called PHP’s Heredoc syntax. It’s there to help you mark up strings without worrying about quotes.

    A simpler example would be:

    $string = <<<STR_END_DELIMITER
    This is some string, I can use ' and " freely, and it wouldn't break the string.
    I can also use $variables inside, and they'll evaluate.
    When I'm done with the string, I'll need to type STR_END_DELIMITER; on a fresh line, without anything else (not even spaces!)
    STR_END_DELIMITER;
    do_stuff_with_string($string);
    

    See the PHP Manual Entry on Strings for more information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please don't send me a link to php.net referencing mysql_real_escape_string as the only response.
What's the correct name for the arrow syntax in PHP, used when referencing an
Referencing this post: ruby on rails average per day I'm getting the average per
I am referencing a COM component from PHP. This COM component returns records using
How can i get information via php or bash to what file referencing a
So, I'm naturally a PHP coder, but I have to use flash for a
Quick question; I replaced a .css file which I was referencing in html/php that
I'm a newbie to MySQL and php and I'm getting wrapped around the axle
Looking at referencing in PHP is pretty much confusing me, can anyone explain to
I'm trying to configure apache 2.2 for php 5.2 (or preferably 5.3, but php.net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.