<?php
$array = [
'ticket_number' => 'sdfsdfsdf 2',
'strategy_id' => '5',
'journal_entries_strategy_conditions' => [
0 => [
'strategies_condition_id' => ''
],
1 => [
'strategies_condition_id' => '1'
]
],
'timeframe' => '',
];
$array['journal_entries_strategy_conditions'] = array_filter(
$array['journal_entries_strategy_conditions'],
fn($v) => $v['strategies_condition_id']
);
var_export($array);
- Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
- array (
'ticket_number' => 'sdfsdfsdf 2',
'strategy_id' => '5',
'journal_entries_strategy_conditions' =>
array (
1 =>
array (
'strategies_condition_id' => '1',
),
),
'timeframe' => '',
)
preferences:
81.65 ms | 402 KiB | 91 Q