Gideon Brett
Gideon Brett

Reputation: 23

New line in .ics using generated PHP

I am creating a script which will generate a .ics file in PHP however when I try to add more than one line to the DESCRIPTION: addition to the attachment it shows up as a new line entirely in the .ics What I type into the php

$var .= "DESCRIPTION: Line1\nLine2" . PHP_EOL;

What is shown in the .ics file

DESCRIPTION: Line1
Line2

Any ideas on how to get around this problem when generating the .ics code in PHP?

Upvotes: 2

Views: 1620

Answers (1)

Alexander Forbes-Reed
Alexander Forbes-Reed

Reputation: 2975

Try making a description with more than 1 line in an application that allows you to make ics files. Then open it in notepad++/sublime or something and see how they parse it.

Upvotes: 1

Related Questions