Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #8116
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!nuzba.szn.dk!pnx.dk!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Date | Tue, 22 Jan 2013 20:08:37 +0100 |
| From | Luuk <luuk@invalid.lan> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.php |
| Subject | Re: define ('NL', "<br />"); can I define a constant var ? |
| References | <bfe0fbed-6727-437f-9c62-552c03dd4692@b11g2000yqh.googlegroups.com> <50FE502B.2070708@arnowelzel.de> <6833t9-kme.ln1@luuk.invalid.lan> <timstreater-4F2B13.18585922012013@news.individual.net> |
| In-Reply-To | <timstreater-4F2B13.18585922012013@news.individual.net> |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Message-ID | <jm43t9-b9f.ln1@luuk.invalid.lan> (permalink) |
| Lines | 34 |
| NNTP-Posting-Host | 2001:980:9089:1:3c76:a769:db37:361e |
| X-Trace | 1358881801 news.xs4all.nl 6979 [2001:980:9089:1:3c76:a769:db37:361e]:49408 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.php:8116 |
Show key headers only | View raw
On 22-01-2013 19:58, Tim Streater wrote: > In article <6833t9-kme.ln1@luuk.invalid.lan>, Luuk <luuk@invalid.lan> > wrote: > >> On 22-01-2013 09:39, Arno Welzel wrote: >> > cate, 2013-01-22 01:06: > >> > With variables this would be easier though: >> > >> > $NL = '<br />'; >> > echo "This is $NL another line"; >> > >> >> Why do you use single quotes on the first line, >> and double on the second? >> >> Why not simply use double-quotes everywhere..... >> >> $NL = "<br />"; >> echo "This is $NL another line"; > > Because the interpreter has to do more work with the string: > > <http://php.net/manual/en/language.types.string.php> > > If you do: > > $NL = '<br />'; > echo 'This is ' . $NL . 'another line'; > > then you avoid the double-quote altogether. > and who is going to notice those msecs ?
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
define ('NL', "<br />"); can I define a constant var ? cate <catebekensail@yahoo.com> - 2013-01-21 16:06 -0800
Re: define ('NL', "<br />"); can I define a constant var ? Adam Harvey <usenet@adamharvey.name> - 2013-01-22 00:44 +0000
Re: define ('NL', "<br />"); can I define a constant var ? BobMCT <r.mariotti@fdcx.net> - 2013-01-21 21:16 -0500
Re: define ('NL', "<br />"); can I define a constant var ? Kim André Akerø <kimandre@nospambetadome.com> - 2013-01-22 03:50 +0100
Re: define ('NL', "<br />"); can I define a constant var ? denisb <newdb@no-log.org> - 2013-01-22 08:17 +0100
Re: define ('NL', "<br />"); can I define a constant var ? Arno Welzel <usenet@arnowelzel.de> - 2013-01-22 09:39 +0100
Re: define ('NL', "<br />"); can I define a constant var ? Luuk <luuk@invalid.lan> - 2013-01-22 19:43 +0100
Re: define ('NL', "<br />"); can I define a constant var ? Tim Streater <timstreater@greenbee.net> - 2013-01-22 18:58 +0000
Re: define ('NL', "<br />"); can I define a constant var ? Luuk <luuk@invalid.lan> - 2013-01-22 20:08 +0100
Re: define ('NL', "<br />"); can I define a constant var ? "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2013-01-23 01:35 +0100
Re: define ('NL', "<br />"); can I define a constant var ? Arno Welzel <usenet@arnowelzel.de> - 2013-01-23 10:59 +0100
Re: define ('NL', "<br />"); can I define a constant var ? The Natural Philosopher <tnp@invalid.invalid> - 2013-01-22 19:40 +0000
Re: define ('NL', "<br />"); can I define a constant var ? Arno Welzel <usenet@arnowelzel.de> - 2013-01-23 10:55 +0100
Re: define ('NL', "<br />"); can I define a constant var ? Jørn Andersen <jorn@jorna.dk> - 2013-01-22 23:51 +0100
Re: define ('NL', "<br />"); can I define a constant var ? Shake <alex.estevezQUENO@QUENOfilnet.es> - 2013-01-23 00:08 +0100
Re: define ('NL', "<br />"); can I define a constant var ? Jørn Andersen <jorn@jorna.dk> - 2013-01-23 00:51 +0100
Re: define ('NL', "<br />"); can I define a constant var ? "Peter H. Coffin" <hellsop@ninehells.com> - 2013-01-22 19:03 -0600
Re: define ('NL', "<br />"); can I define a constant var ? Shake <alex.estevezQUENO@QUENOfilnet.es> - 2013-01-23 03:42 +0100
Re: define ('NL', "<br />"); can I define a constant var ? Jerry Stuckle <jstucklex@attglobal.net> - 2013-01-22 19:50 -0500
csiph-web