I’m not sure what the point is of copying the content of one array to to another.
Where you say $data = mysqli_fetch_assoc($result_money) then $datais already an array.
So you could forget the while and just say $split = mysqli_fetch_assoc($result_money) which is the same thing with a different variable name.
OK, you do change the key names, but that could be done in the query using AS:-
$sql_money = "SELECT j_id AS id, amount_invested AS invest FROM j_members WHERE j_activated = 1 LIMIT 5";
Thanks. Not sure if it’s still a problem now, as the OP has edited the code to use the results retrieved from the query, but not added any detail on what is actually going wrong.