PHP Classes

File: functions.php

Recommend this page to a friend!
  Classes of ganesh kavhar   PHP Event Planner   functions.php   Download  
File: functions.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP Event Planner
Application to help users to organize events
Author: By
Last change:
Date: 1 year ago
Size: 974 bytes
 

Contents

Class file image Download
<?php

function echoValue($array, $fieldName) {
    if (isset(
$array) && isset($array[$fieldName])) {
        echo
$array[$fieldName];
    }
}

function
echoChecked($array, $fieldName, $value) {
    if (isset(
$array[$fieldName]) && $array[$fieldName] == $value) {
        echo
'checked="checked"';
    }
}

function
echoCheckedArray($array, $fieldName, $value) {
    if (isset(
$array[$fieldName]) &&
           
is_array($array[$fieldName]) &&
           
in_array($value, $array[$fieldName])) {
        echo
'checked="checked"';
    }
}

function
echoSelected($array, $fieldName, $value) {
    if (isset(
$array[$fieldName]) && $array[$fieldName] == $value) {
        echo
'selected="selected"';
    }
}

function
echoSelectedArray($array, $fieldName, $value) {
    if (isset(
$array[$fieldName]) &&
           
is_array($array[$fieldName]) &&
           
in_array($value, $array[$fieldName])) {
        echo
'selected="selected"';
    }
}