: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
private function array_squash( $data )
// For each item in the array...
foreach ( $data as $row ) {
// If the item has more than 1 attribute...
if ( 1 < count( $row ) ) {
// Assign the data to an associated result.
$response[ $row[ 'id' ] ] = $row;
// Unset the id setting, as that will be the key.
unset( $response[ $row[ 'id' ] ][ 'id' ] );
} // Otherwise... (We only have 1 attribute.)
// Add the id to the stack in a non-associated result.
$response[] = intval( $row[ 'id' ] );