# Simple php if else on one line question

**URL:** <https://forum.kirupa.com/t/simple-php-if-else-on-one-line-question/235366>\
**Category:** Uncategorized\
**Created:** [August 10, 2007, 2:23pm UTC](https://forum.kirupa.com/t/simple-php-if-else-on-one-line-question/235366 "2007-08-10T14:23:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![atarijake](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@atarijake](https://forum.kirupa.com/u/atarijake)\
**Post date:** [August 10, 2007, 2:23pm UTC](https://forum.kirupa.com/t/simple-php-if-else-on-one-line-question/235366/1 "2007-08-10T14:23:21Z")

</div>

Hey guys, I’m guessing this is a really easy one but I can’t figure out what this is called. I’m looking at someone elses code and here’s the snippet:

```auto
$id = ($this->uri->segment(3) == "") ? '16': $this->uri->segment(3);

```

The whole ? and then : thing, what’s that called and where can I find more information about how that works? thanks!!!
