Skip to content

archaeron/PHPLinq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHPLinq

Technically this isn't a real Language Integrated Query, but it tries to emulate the excellent C# LINQ library. Still without much functionality and not tested.

Usage

<?php	
$query = new PHPQuery();

$query->from($sample_data);
$query->where('id', function($a){ return $a != 5; });
$query->where('price', function($p){return $p > 300;});
$query->select('id', 'name');
// or: $query->select(array('id', 'name'));

foreach($query as $elem)
{
    var_dump($elem);
}
?>

Documentation

See the wiki for more help

About

Linq like queries in PHP

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages