Hi! Could we please enable some services and cookies to improve your experience and our website?

PHPize Online / SQLize Online  /  SQLtest Online

A A A
Login    Share code      Blog   FAQ

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

Copy Format Clear
/* #Запрос который отправляю [{ "user_tg_id": "{{this_user.platform_id}}", "user_points": "{{all_point}}" }] */

Stuck with a problem? Got Error? Ask AI support!

Copy Clear
Copy Format Clear
<?php $ar1 = [ 0 => '2021-08-05', 7 => '2021-08-04', 13 => '2021-07-15', 26 => '2021-07-10' ]; $ar2 = [ 0 => ['2021-08-05' => 3], 1 => ['2021-07-10' => 6] ]; $dates = array_reduce( $ar2, function($res, $el) { $res[array_key_last($el)]=array_pop($el); return $res; }, [] ); print_r($dates);
Copy Clear