You are here: Re: Anoying problem with multiple 'elseif' variations... « PHP Language « IT news, forums, messages
Re: Anoying problem with multiple 'elseif' variations...

Posted by Phil on 10/02/58 11:21

Peter Butler wrote:

> if ($a==a && $b==a && $c==a && $d==a && $e==a && $f==a && $g==a && $h==a
> && $i==a && $j==a)
> { do thing AA}
[snip]

Haven't got time to look at this in detail, but my first thought is that,
rather than using separate variables - $a, $b etc - you should probably be
using an array - $mystuff['a'], $mystuff['b'] - you could then use
array_walk or foreach to cycle through the array, perhaps in a function to
which you pass the 'odd man out' or other conditions as parameters.

@+

 

Navigation:

[Reply to this 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

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