ninja_forms_remove_from_array
The Ninja Forms ninja forms remove from array function.
Description
Parameters (4)
- 0. $arr
- The arr.
- 1. $key
- The key.
- 2. $val
- The val.
- 3. $within — Optional. (constant) =>
FALSE
- The within.
Usage
if ( !function_exists( 'ninja_forms_remove_from_array' ) ) { require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/functions.php'; } // The arr. $arr = null; // The key. $key = null; // The val. $val = null; // The within. $within = FALSE; // NOTICE! Understand what this does before running. $result = ninja_forms_remove_from_array($arr, $key, $val, $within);
Defined (1)
The function is defined in the following location(s).
- /deprecated/includes/functions.php
- function ninja_forms_remove_from_array($arr, $key, $val, $within = FALSE) {
- foreach ($arr as $i => $array)
- if ($within && stripos($array[$key], $val) !== FALSE && (gettype($val) === gettype($array[$key])))
- unset($arr[$i]);
- elseif ($array[$key] === $val)
- unset($arr[$i]);
- return array_values($arr);
- }