| @@ 517-526 (lines=10) @@ | ||
| 514 | * @param $needle string |
|
| 515 | * @param $echo bool |
|
| 516 | */ |
|
| 517 | public function checked($haystack=false,$needle='',$echo=true) { |
|
| 518 | $return = $this->itemd($haystack,$needle,'checked'); |
|
| 519 | if('' !== $return) { |
|
| 520 | if (true === $echo) { |
|
| 521 | echo $return; |
|
| 522 | } else { |
|
| 523 | return $return; |
|
| 524 | } |
|
| 525 | } |
|
| 526 | } |
|
| 527 | ||
| 528 | /** |
|
| 529 | * Checks to see if an item is checked. |
|
| @@ 535-544 (lines=10) @@ | ||
| 532 | * @param $needle string |
|
| 533 | * @param $echo bool |
|
| 534 | */ |
|
| 535 | public function selected($haystack=false,$needle='',$echo=true) { |
|
| 536 | $return = $this->itemd($haystack,$needle,'selected'); |
|
| 537 | if('' !== $return) { |
|
| 538 | if (true === $echo) { |
|
| 539 | echo $return; |
|
| 540 | } else { |
|
| 541 | return $return; |
|
| 542 | } |
|
| 543 | } |
|
| 544 | } |
|
| 545 | ||
| 546 | /** |
|
| 547 | * Checks to see if an item is selected. If $echo is false, it will return the $type if conditions are true. |
|