I been working on some addons and looking for optimization some foreach any suggest about this code?
Want to same users stories to same array.
PHP:
Read more
Читать далее...
Want to same users stories to same array.
PHP:
Код:
$addedStoryUsers = [];
$storyUsers = [];
$var_limit = 1;
foreach($stories AS $story){
if(in_array($story->User->user_id, $addedStoryUsers))continue;
if($var_limit <= $limit){
$storyUsers[$story->User->user_id] = [
'user' => $story->User...
Read more
Читать далее...