Reply to Re: how to clear an array

Your name:

Reply:


Posted by JDS on 10/13/50 11:28

On Wed, 05 Oct 2005 13:26:33 +0200, Sentinel wrote:

> php code

....is a horrible jumbled mess that I don't have time to decipher.

1) Don't print or echo lines of HTML, it just makes things very very messy
when there are large blocks of HTML. Instead, drop out of PHP and write
the HTML as plain HTML. Example:

<?php
echo "blah\n";
?>
<h1>blah blah</h1>
<h2><? echo $header2 ?></h2>

etc...


2) Use careful, proper, consistent formatting -- indents in consistent
places, brackets, curlies, and parens in consistent places. I think
that some of the mess may be an artifact of your news reader breaking
lines at around 80 chars. If this is the case, then dump the code into a
plain text file and put it on the web somewhere so I can look at it in my
browser.

As for your questions, you *do* know how many rows there are. That data
is in two places:

count($row_menuheader);

and

mysql_num_rows($r_menuheader);


Another suggetion, go to the PHP.net website and cut and paste their code
for looping through MySQL data sets. Then change the names to suit.

later...

--
JDS | jeffrey@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация