Hi i was recently looking over a shopping cart paginator class, trying to understand their code so i could build my own paginator when i came across the following line of code. It resembles a ternary statement but is written in a way that i have never seen before. I would google it but i wouldn't know what to google. Could someone please tell me what this is how it works and what it is called so i can do a search for it and learn more.
return ($output ? '<div class="' . $this->style_links . '">' . $output . '</div>' : '')
. '<div class="' . $this->style_results . '">' . sprintf($this->text, ($total) ? (($page - 1) * $limit) + 1 : 0, ((($page - 1) * $limit) > ($total - $limit)) ? $total : ((($page - 1) * $limit) + $limit), $total, $num_pages) . '</div>';
Just let me know if this is enough code to go on Thanks Andrew