PHP code example of timetoogo / pinq
1. Go to this page and download the library: Download timetoogo/pinq library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
timetoogo / pinq example snippets
$youngPeopleDetails = $people
->where(function ($row) { return $row['age'] <= 50; })
->orderByAscending(function ($row) { return $row['firstName']; })
->thenByAscending(function ($row) { return $row['lastName']; })
->take(50)
->indexBy(function ($row) { return $row['phoneNumber']; })
->select(function ($row) {
return [
'fullName' => $row['firstName'] . ' ' . $row['lastName'],
'address' => $row['address'],
'dateOfBirth' => $row['dateOfBirth'],
];
});