Re: [PHP] Looking for optimal coding

2002-02-15 Thread Peter J. Schoenster
On 14 Feb 2002, at 22:18, Phillip S. Baker wrote: > This is not a big thing. > But I am looking at this thinking there is a way to make the code take > up even less lines. Just want to stick this in my cap for future > reference. > > for($i=01;$i<=50;$i++) { > if (!empty($content)) {

RE: [PHP] Looking for optimal coding

2002-02-15 Thread Ford, Mike [LSS]
> -Original Message- > From: Joffrey van Wageningen [mailto:[EMAIL PROTECTED]] > Sent: 15 February 2002 09:00 > > i would try: > > for($i=01;$i<=50;$i++) { > if(!empty($content) && $row[$content] == $states[$i]) > $selected = " selected"; > elseif($dstate == $states[$i]) >

Re: [PHP] Looking for optimal coding

2002-02-15 Thread LuC .
); } I always prefer to use printf to mix content and data. And why not use the || your reaching a single solution Jerry Verhoef >-Original Message- >From: Joffrey van Wageningen [mailto:[EMAIL PROTECTED]] >Sent: Friday, February 15, 2002 10:00 AM >To: PHP Emai

Re: [PHP] Looking for optimal coding

2002-02-15 Thread Joffrey van Wageningen
> This is not a big thing. > But I am looking at this thinking there is a way to make the code take up > even less lines. > for($i=01;$i<=50;$i++) { > if (!empty($content)) { > if ($row[$content]==$states[$i]) > echo " selected>$nstates[$i]\n

RE: [PHP] Looking for optimal coding

2002-02-14 Thread Jason Murray
> Any expert programmers out there with the way to chop this > even further? I would suspect that chopping this further would make it even harder to understand/maintain in the future... J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php