Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!weretis.net!feeder4.news.weretis.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <2260019.FRqVoOGUtd@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Mon, 30 Jan 2012 16:03:58 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit Subject: Re: php+html mixup in displaying multidimensional array in html tables Newsgroups: comp.lang.php References: <9ojfv3Fhu4U1@mid.uni-berlin.de> <5854644.bgypaU67uL@PointedEars.de> <5359343.2Cvizievi3@PointedEars.de> <2189072.SVPtWovscQ@PointedEars.de> Followup-To: comp.lang.php MIME-Version: 1.0 Lines: 35 NNTP-Posting-Date: 30 Jan 2012 16:03:58 CET NNTP-Posting-Host: 01b43349.newsspool1.arcor-online.net X-Trace: DXC=lcShaK5IVA_[7Non7UCi8Uic==]BZ:af^4Fo<]lROoRQ<`=YMgDjhgRLL;M;5WHcBPDZm8W4\YJN\;?f@h5gMfb\5JLRX7TES^VKa;GWM;Jbb\ X-Complaints-To: usenet-abuse@arcor.de Xref: x330-a1.tempe.blueboxinc.net comp.lang.php:4685 Scott Johnson wrote: > […] trying to wrap my head around what you mean by "validation before the > php source code is deployed on the production server". The only thing I > can guess is that you are meaning using you editor to validate your code > structure? That is correct. For example, Eclipse PHP Development Tools (PDT) [1] allow you to perform validation both on the PHP code *and* the content that is being generated with PHP if the latter is generated outside of PHP sections. It is also properly highlighted then, and the structure is displayed in the Outline View (where you can switch between the PHP parse tree and the markup/whatever parse tree). This is very helpful, especially if you need to generate content with a complex structure (e. g. in templates). It appears to work with any generated content, as long as the filename suffix is .php or you have added the Content-Type to the list of PHP types and opened the file with the PHP Editor. (This also works with temporary files downloaded from the production server for a quick fix to be backported later.) Apparently that client-side validation is not as common a technique among PHP developers as I thought. However, this would account for the amount of markup ranging from being slightly invalid to completely borken, working only by chance because of browser's error correction, that is generated by many PHP-driven Web applications. PointedEars ___________ [1] -- Danny Goodman's books are out of date and teach practices that are positively harmful for cross-browser scripting. -- Richard Cornford, cljs, (2004)