---
# System prepended metadata

title: 輸出
tags: [Laravel]

---

---
tags: Laravel
---

# 輸出

### ==echo== 

```php=
$str = "okya";
echo $str;

// 印出 okya
```

### ==var_dump==

- var_dump函式會正確的判斷出陣列及型態一起印出

```php=
$arrarGet = [ "john"=>123 , "bryan"=>567 , ];


var_dump($arrarGet);

 // 印出 
  array(2) {
  ["john"]=>
  int(123)
  ["bryan"]=>
  int(567)
}
```

### ==print_r==
- print_r 會以印出陣列的方式印出內容

```php=
$arrarGet = [ "john"=>123 , "bryan"=>567 , ];

print_r($arrarGet);

//印出

Array
(
    [john] => 123
    [bryan] => 567
)
```