Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <1412482.V9SEqChMir@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Sat, 28 Jan 2012 21:43:41 +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: Followup-To: comp.lang.php MIME-Version: 1.0 Lines: 35 NNTP-Posting-Date: 28 Jan 2012 21:43:41 CET NNTP-Posting-Host: 22d34d78.newsspool4.arcor-online.net X-Trace: DXC=leG99o]PM`O^B]`=U:WelB4IUK I am new to this problem and shall be very grateful for any hint on how > to a´void an unreadable code-salad, when trying to display a > bidimensional array (thus with two indexes) on a html table. > I refer to the continuous shifting between every two > lines. You mean `'; there can be only one `' tag in a (Valid) HTML document. Contrary to common misconception, several `'s in a file parsed by PHP are healthy and appropriate, as it is the most efficient method (stdin --> stdout) and the easiest to maintain (no quoting necessary; parsing, that includes syntax highlighting and client-side validation, just works both for HTML and PHP). Only make sure that you do not mix too much program logic with the output (loops are OK). Use the template approach (not necessarily a full-blown template system like Smarty). And, as always, indent your code so that you can tell sections apart. RTFM: > Is there a method which is 'quick an easy' to do the job ? Yes. You have found it. PointedEars -- Use any version of Microsoft Frontpage to create your site. (This won't prevent people from viewing your source, but no one will want to steal it.) -- from (404-comp.)