X7ROOT File Manager
Current Path:
/home/jurarevi/beta.jurareview.ro/system/helpers
home
/
jurarevi
/
beta.jurareview.ro
/
system
/
helpers
/
📁
..
📄
array_helper.php
(2.53 KB)
📄
captcha_helper.php
(8.02 KB)
📄
cookie_helper.php
(2.61 KB)
📄
date_helper.php
(12.75 KB)
📄
directory_helper.php
(2.1 KB)
📄
download_helper.php
(2.76 KB)
📄
email_helper.php
(1.53 KB)
📄
file_helper.php
(11.19 KB)
📄
form_helper.php
(21.35 KB)
📄
html_helper.php
(8.67 KB)
📄
index.html
(114 B)
📄
inflector_helper.php
(5.33 KB)
📄
language_helper.php
(1.46 KB)
📄
number_helper.php
(1.9 KB)
📄
path_helper.php
(1.82 KB)
📄
security_helper.php
(2.7 KB)
📄
smiley_helper.php
(6.4 KB)
📄
string_helper.php
(6.37 KB)
📄
text_helper.php
(12.61 KB)
📄
typography_helper.php
(2.27 KB)
📄
url_helper.php
(12.15 KB)
📄
xml_helper.php
(1.83 KB)
Editing: array_helper.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 1.0 * @filesource */ // ------------------------------------------------------------------------ /** * CodeIgniter Array Helpers * * @package CodeIgniter * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team * @link http://codeigniter.com/user_guide/helpers/array_helper.html */ // ------------------------------------------------------------------------ /** * Element * * Lets you determine whether an array index is set and whether it has a value. * If the element is empty it returns FALSE (or whatever you specify as the default value.) * * @access public * @param string * @param array * @param mixed * @return mixed depends on what the array contains */ if ( ! function_exists('element')) { function element($item, $array, $default = FALSE) { if ( ! isset($array[$item]) OR $array[$item] == "") { return $default; } return $array[$item]; } } // ------------------------------------------------------------------------ /** * Random Element - Takes an array as input and returns a random element * * @access public * @param array * @return mixed depends on what the array contains */ if ( ! function_exists('random_element')) { function random_element($array) { if ( ! is_array($array)) { return $array; } return $array[array_rand($array)]; } } // -------------------------------------------------------------------- /** * Elements * * Returns only the array items specified. Will return a default value if * it is not set. * * @access public * @param array * @param array * @param mixed * @return mixed depends on what the array contains */ if ( ! function_exists('elements')) { function elements($items, $array, $default = FALSE) { $return = array(); if ( ! is_array($items)) { $items = array($items); } foreach ($items as $item) { if (isset($array[$item])) { $return[$item] = $array[$item]; } else { $return[$item] = $default; } } return $return; } } /* End of file array_helper.php */ /* Location: ./system/helpers/array_helper.php */
Upload File
Create Folder