Jump to content

clear my logics

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
Please, can anyone help me to provide a better logic in this case?
$config['publish'] might only be 0 or 1, and the $rsel line shall be executed on all occasions, except when $config['publish']is 0 AND the $row['id'] equals 200.


if (!$config['publish'] && $row['id'] == "200") {

} else {

	$rsel[$row['id']] = $row['name'];

}



#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
if ($config['publish'] || $row['id']!== "200") {
    $rsel[$row['id']] = $row['name'];
}  

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Brandon W

Brandon W

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,828 posts
I haven't been here in a while, so have you started to learn PHP Winged? Or you just know that because it's fairly similar in most programming languages.
jQuery Selectors Tutorial - jQuery Striped Table tutorial - jQuery Events - jQuery Validation

Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!


#4
Guest_Jordan_*

Guest_Jordan_*
  • Guests
EDIT: Read the initial thread wrong - saw an "OR" where there was in fact an "AND".

#5
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
I know a little PHP, and DeMorgan's law :)
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#6
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
Yeah, De Morgans law, I recognize the name, I was just too tired to think by my self when I posted that one. and it wasn't that late either, only 1:18am...