[thelist] \r\n and single quotes in php

Dunstan Orchard dunstan at 1976design.com
Sat Mar 8 16:19:00 CST 2003


> > Dunstan:
> > Is there any way I can retain the use of my single quotes, but still get
> > \r\n to work in php?

> Kelly Hallman:
> Check out the heredoc syntax on this page:
> http://www.php.net/manual/en/language.types.string.php
> Note the warning that the closing identifier cannot be delimited.
> This caused me some grief recently.
>
> Your other options are to end with '<htmlcode"">'."\r\n\r\n" or you could
> define a function, constant or other variable that evaluates to
> \r\n\r\n and concatenate that onto the end, which might make things
> more readable.
>
> or you could actually do this:
> $footer_paging = '<div class="tone2" style="padding: 5px; border-top:
> 1px solid #aaa; font-size: 80%;">\r\n' . $paging . '</div>
>
> ';


Thanks kelly, you're Little Miss Helpful for me just now - another problem
you've solved :o)

I think I'll go with:

'<htmlcode"">'."\r\n\r\n"

that makes sense to me.

thanks again,

- dunstan

---------------------------
Dorset, England
http://www.1976design.com/
http://www.orchard.it/
http://www.maccaws.org/



More information about the thelist mailing list