PHP: Codeoptimierung
Verfasst: Di 22.Feb, 2005 20:31
Bilde ich mir das ein, oder wird schneller abgearbeitet als
?
Code: Alles auswählen
($CFG['exceptional_random_cats'] == '') ? $except_random_cat_id = '\'start\'' : $except_random_cat_id = $CFG['exceptional_random_cats'];
($CFG['not_exceptional_random_forums'] == '') ? $except_random_forum_id = '\'start\'' : $except_random_forum_id = $CFG['not_exceptional_random_forums'];Code: Alles auswählen
if( $CFG['exceptional_random_cats'] == '' )
{
$except_random_cat_id = '\'start\'';
}
else
{
$except_random_cat_id = $CFG['exceptional_random_cats'];
}
if( $CFG['not_exceptional_random_forums'] == '' )
{
$except_random_forum_id = '\'start\'';
}
else
{
$except_random_forum_id = $CFG['not_exceptional_random_forums'];
}