Untitled

mail@pastecode.io avatar
unknown
php
2 years ago
213 B
11
Indexable
Never
<?php

foreach($array2 as $subscription){
  foreach($array1 as $product) {
    if ($subscription->plan->product == $product->id){
        $product->subscription = $subscription;
        break;
    }
  }
}