Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function test() {
- $data = '["B015f6c48c43b7494", "B69036e96dccae075"]';
- $result=[];
- $decode = json_decode($data, true);
- foreach($decode as $row){
- array_push($result, ['id'=>$row]);
- }
- return $result;
- }
- var_dump(test());
Add Comment
Please, Sign In to add comment