Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <3866294.L8KrQWI3Da@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Fri, 11 Oct 2013 01:37:26 +0200 User-Agent: KNode/4.10.5 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. MIME-Version: 1.0 Lines: 63 NNTP-Posting-Date: 11 Oct 2013 01:37:31 CEST NNTP-Posting-Host: e56fe12b.newsspool2.arcor-online.net X-Trace: DXC=Mo>7 On 10/10/2013 01:01 PM, richard wrote: >> On Wed, 9 Oct 2013 22:32:22 -0400, richard wrote: >>> http://mroldies.net/200/audiox.php >>> >>> First, the sound will work only in firefox. >>> So don't go bashing me for that. >> >> >> > $number=$numbers[0]; >> echo ''; >> ?> >> >> At least the first number is now displayed. > > echo ""; The safe syntax is echo ""; > No need to quote the *values*, they are sent as text. Utter nonsense. Depending on the version of HTML and the attribute value, attribute values MUST be quoted. The safe approach is to *always* quote attribute values, it certainly is when attribute values or parts of those are generated like here. Since double-quoting is more common than single- quoting, double-quoting as it was done by the OP actually is the safe approach. You might have misread the original code, which is actually equivalent to echo ''; if we assume that the line-break after “$number.'"” was accidental originally or was inserted when you quoted the original code. In particular, in your code the value of $alpha must be *URI-encoded* or the URI-reference that is the attribute value is invalid or the entire HTML fragment could become invalid (or code-injected) if $alpha contains space or special characters. Other generated attribute values, unless it is certain that code injection is impossible (for example with int values), SHOULD be htmlspecialchars()'d. > Not sure what you're doing with -alpha-, I assume it is a variable as > well... Does it look like one? RTFM. PointedEars -- > If you get a bunch of authors […] that state the same "best practices" > in any programming language, then you can bet who is wrong or right... Not with javascript. Nonsense propagates like wildfire in this field. -- Richard Cornford, comp.lang.javascript, 2011-11-14