| @@ 547-556 (lines=10) @@ | ||
| 544 | * @param $needle string |
|
| 545 | * @param $echo bool |
|
| 546 | */ |
|
| 547 | public function checked($haystack=false,$needle='',$echo=true) { |
|
| 548 | $return = $this->itemd($haystack,$needle,'checked'); |
|
| 549 | if('' !== $return) { |
|
| 550 | if (true === $echo) { |
|
| 551 | echo $return; |
|
| 552 | } else { |
|
| 553 | return $return; |
|
| 554 | } |
|
| 555 | } |
|
| 556 | } |
|
| 557 | ||
| 558 | /** |
|
| 559 | * Checks to see if an item is checked. |
|
| @@ 565-574 (lines=10) @@ | ||
| 562 | * @param $needle string |
|
| 563 | * @param $echo bool |
|
| 564 | */ |
|
| 565 | public function selected($haystack=false,$needle='',$echo=true) { |
|
| 566 | $return = $this->itemd($haystack,$needle,'selected'); |
|
| 567 | if('' !== $return) { |
|
| 568 | if (true === $echo) { |
|
| 569 | echo $return; |
|
| 570 | } else { |
|
| 571 | return $return; |
|
| 572 | } |
|
| 573 | } |
|
| 574 | } |
|
| 575 | ||
| 576 | /** |
|
| 577 | * Checks to see if an item is selected. If $echo is false, it will return the $type if conditions are true. |
|