I've got a link that I'm using to add an entry into my Google calendar. I'm getting the data from database which is stored in a human readable format (it was initially captured from a text area), which typically is spread over more than one line, for example...
Big day out at the zoo.
Bring sunscreen.
...and on my page I set it as a variable...
$event_info = get_post_meta($post->ID, 'event_info', TRUE);
The problem is when I create a query string it doesn't account for the new line characters (just showing the relevant part of the query string below)...
&details=Big+day+out+at+the+zoo.Bring+sunscreen.
...and so when I view it in my Calendar it looks like this...
Big day out at the zoo. Bring sunscreen.
...instead of on two lines.
I understand that I can use a new line character in the query string with %0D but I don't know how to get it into my query string. I'm guessing there is some PHP function for this purpose that will take my $event_info
variable and add the new line characters, but I'm unsure.
Any suggestions would be great.