Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- array:3 [
- 0 => {
- "applied_date": "10-10"
- "count": 1
- }
- 1 => {
- "applied_date": "10-14"
- "count": 1
- }
- 2 => {
- "applied_date": "10-15"
- "count": 1
- }
- ]
- <?php
- // Array representing a possible record set returned from a database
- $records = array(
- array(
- "applied_date"=> "10-10",
- "count"=> 1
- ),
- array(
- "applied_date"=> "10-10",
- "count"=> 1
- ),
- array(
- "applied_date"=> "10-10",
- "count"=> 1
- )
- );
- $applied_date = array_column($records, 'applied_date');
- $count = array_column($records, 'count');
- print_r($applied_date);
- print_r($count);
- ?>
- $applied_dates_arr = [];
- $count_arr = []
- foreach ($counts as $el) {
- $applied_dates_arr[] = $el['applied_date'];
- $count_arr[] = $el['count'];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement