---
title: "OR i if?"
type: "forum-thread"
url: "https://www.webforum.nu/amne/php/49307-or-i-if"
topic: "PHP"
topic_url: "https://www.webforum.nu/amne/php"
author: "Cactuz"
published: "2002-08-02T15:06:17.000Z"
updated: "2002-08-02T15:17:28.000Z"
replies: 3
views: 191
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/php/49307-or-i-if"
---

# OR i if?

## #1 — Cactuz, 2002-08-02T15:06Z

Hur gör man

```
IF a = b [u][b]OR[/b][/u] b = c THEN
```

i PHP?

Permalänk: https://www.webforum.nu/p/49307

## #2 — SDCd, 2002-08-02T15:10Z

OR skrivs 

```
||
```

Permalänk: https://www.webforum.nu/p/739058

## #3 — LAMP, 2002-08-02T15:15Z

...eller med OR. PHP godkänner både \|\| och OR.

Permalänk: https://www.webforum.nu/p/739062

## #4 — LAMP, 2002-08-02T15:17Z

missade halva frågan :)

```php
if ( a == b || b == c ) {

// Gör något

}
```

Permalänk: https://www.webforum.nu/p/739065

---

Tråden på webben: https://www.webforum.nu/amne/php/49307-or-i-if
