> For the complete documentation index, see [llms.txt](https://tobyisme.gitbook.io/php/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tobyisme.gitbook.io/php/xiao-gong-neng/arraypush.md).

# array\_push

用來將值一個一個的丟到陣列裡面，可以用迴圈去跑

格式：**array\_push**( $array , $value );

```php
$android = [];
$ios = [];
foreach($mdIdArray as $val){

    $data = $sat_r->getGcmIdByMdID($val);
    if(count($data) == 0 || is_null($data)){
        return false;
    }
    if($data->mur_systemtype == 0){
        array_push($android,$data['mur_gcmid']);
    }
    if($data->mur_systemtype == 1){
        array_push($ios,$data['mur_gcmid']);
    }
}
```
