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 7999491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:31:19+00:00 2026-06-04T15:31:19+00:00

I have a vcalendar file. It works perfect if i type it between php

  • 0

I have a vcalendar file. It works perfect if i type it between php tags like this

?>


BEGIN:VEVENT
DTSTART;VALUE=DATE:20110422
DTEND;VALUE=DATE:20120529
DTSTAMP:20120529T124028Z
UID:7a6db67f3edff4729956c47ec@calendarlabs.com
CREATED:20111213T123901Z
DESCRIPTION:Visit http://www.calendarlabs.com/holidays/ to know more about New Year's Day and for any other calendar needs.
LAST-MODIFIED:20111213T123901Z
LOCATION:
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:New Year's Day
TRANSP:TRANSPARENT
END:VEVENT


 <?php

 echo :

However, soon as i put it in echo statements like so:

 echo "BEGIN:VEVENT"; 

then it doesn’t work. I have tried adding \n,
everything.

Also doesnt work if i do something like:

   DTSTART;VALUE=DATE:<?php echo $date; ?>

Can anybody else see a solution here?

  • 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-04T15:31:21+00:00Added an answer on June 4, 2026 at 3:31 pm

    PHP’s closing tag eats whitespace following it. If you want to preserve newlines when outputting with PHP, you will need to do one of the following:

    • Output the newline character explicitly:

      DTSTART;VALUE=DATE:<?php echo $date, PHP_EOL; ?>
      
    • Use heredoc syntax:

      echo <<<END
      BEGIN:VEVENT
      ...
      DTSTART;VALUE=DATE:$date
      END;
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application, it is creating an ICS similar to the following: BEGIN:VCALENDAR
I have a PHP file that handles sending out confirmation emails. I also have
I have an enum defined in the Constants.h file this way: typedef enum {
I have a chunk of PHP code that I'd like to include on a
I have a XML-file, which contains the data of a calendar. I want to
This is what I have: class Calendar extends CI_Controller { public $extension; function __construct()
I have a php calendar at http://idea-palette.com/aleventcal/calendar.php . I want the days that are
I have the calendar.ics file. I have to read that file from my application
I am looking for a PHP class that can parse an ICalendar (ICS) file
sorry to post this but have been struggling now for 8 days and really

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.