PHP Classes

PHP Collection to Array: Manipulate a collection of values using arrays

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 70 This week: 1All time: 10,251 This week: 560Up
Version License PHP version Categories
collection-class 1.0GNU Lesser Genera...5PHP 5, Data types
Description 

Author

This class can manipulate a collection of item values using arrays.

It provides several functions to manipulate the items of a collection.

Currently, it can:

- Get the list of collection items

- Get a string to represent the collection items in JSON format

- Get the value of the first collection item

- Get the value of the last collection item

- Get the count of items in the collection

- Traverse the collection items and invoke a callback function for each value

- Traverse the collection items and invoke a callback function for each value

- Traverse the collection items and invoke a callback function for each item

- Traverse the collection items and invoke a filter function for all items

- Traverse the collection items and invoke a map function for all items

- Get an iterator object to traverse all collection items

Picture of mohammad anzawi
  Performance   Level  
Name: mohammad anzawi <contact>
Classes: 8 packages by
Country: Jordan Jordan
Age: 9
All time rank: 14322 in Jordan Jordan
Week rank: 416 Up2 in Jordan Jordan Equal
Innovation award
Innovation award
Nominee: 2x

Example

<?php

include_once('Collection.php');

$db = new PDO("mysql:host=localhost;dbname=collection", "homestead", "secret");

$posts = $db->query("SELECT * FROM posts");
$posts = $posts->fetchAll(PDO::FETCH_OBJ);


Details

collection-class

collection class - ???? ????? ????????

??? ????? ?? ????? ????? ??????

????? ?????? ??????? ?? ??? :

  • ????? ?????: http://goo.gl/wbo0xA
  • ????? ?????? : http://goo.gl/Hs0JHc
  • ????? ?????? : http://goo.gl/8zEbKr

  Files folder image Files  
File Role Description
Accessible without login Plain text file Collection.php Class Class source
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file README.md Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
 100%
Total:70
This week:1
All time:10,251
This week:560Up