PHP Classes

ubarray: Generate arrays with a special structure

Recommend this page to a friend!
  Info   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 203 This week: 1All time: 8,449 This week: 560Up
Version License PHP version Categories
ubarray 1.0Freeware5.0PHP 5, Data types
Description 

Author

This class can be used to manipulate and generate arrays with a special structure.

It provides different functions that can manipulate and generate arrays. Currently it can:

- Generate an array with values made of keys and values of an associative array separated by colons
- Generate an associative array parsing values of another array that have the array keys and values separated by colons
- Verify whether a value is an array and return an array with the value if it is not an array
- Check whether an array contains array values
- Create an array with elements of another array with a given key or value
- Determine the depth of a nested array
- Return the element of an array in a given position
- Return all values of array as a string with given prefix and suffix optionally ignoring some values
- Merge two arrays
- Removed repeated elements from an array
- Remove elements of an array with given key or value
- Add a value to an array
- Search an array for an element with a given value

Picture of Reynier Blanco
Name: Reynier Blanco <contact>
Classes: 6 packages by
Country: Cuba Cuba
Age: 38
All time rank: 19493 in Cuba Cuba
Week rank: 411 Up1 in Cuba Cuba Up

Details

Es cierto que el php se caracteriza por tener una gran cantidad de funciones que permiten una buena manipulación de los arreglos. Objetivo: 1. Permite la manipulación de arreglo para cierta búsqueda o manipulación de información. 2. Trabajar con arreglos de objetos, así como obtener cierta información de estos, concernientes a un método especifico. Funcionalidades ubArray::add_elem($array_arr,45); Adiciona un valor a cada posición dentro del arreglo ubArray::array_keys_not_numeric($array_arr); Devuelve solo las llaves no numéricas del array entrante. ubArray::array_keys_object($array_obj,"get__value",13); Devuelve las llaves que correspondan con el valor de ese campo en específico para un arreglo de objeto. ubArray::choose_position($array_obj,3); Devuelve el valor de esa posición no importa si existen claves intermedias o no. ubArray::dimention($array_arr); Devuelve la dimensión de un arreglo. ubArray::exclude_elem($array_arr[0],1); Elimina un elemento del arreglo. ubArray::filter_by_key($array_arr,"value",true); Devuelve un arreglo de los elementos correspondientes a esa llave o método ubArray::filter_by_value($array_obj,"get__value",array(12,16,18)); Devuelve del solo los elementos donde en la llave o método key concuerde con el valor pasado.

  Files folder image Files  
File Role Description
Plain text file array.php Class Main Class
Accessible without login Plain text file index.php Example example
Plain text file option.php Class class example
Accessible without login Plain text file readme_es.txt Doc. description
Plain text file see.php Class class auxiliar

 Version Control Unique User Downloads Download Rankings  
 0%
Total:203
This week:1
All time:8,449
This week:560Up