This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
uphp:functions:print_r [2017/03/27 21:44] jeff created |
uphp:functions:print_r [2021/09/13 05:57] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ======print_r====== | ======print_r====== | ||
| + | |||
| < | < | ||
| - | Dump the contents of an array to the current output | + | Dump the contents of an < |
| ====Description==== | ====Description==== | ||
| - | <well size=" | + | |
| - | < | + | <well size=" |
| - | <span style=" | + | <span style=" |
| - | <span style=" | + | <span style=" |
| - | <span style=" | + | <span style=" |
| + | <span style=" | ||
| </ | </ | ||
| + | |||
| + | Prints human-readable information about an < | ||
| ====Parameter==== | ====Parameter==== | ||
| - | < | ||
| - | ====Return | + | < |
| + | |||
| + | ====Return | ||
| None | None | ||
| ====Examples==== | ====Examples==== | ||
| - | **Create an array with key/value pairs and dump the contents to the current output:** | + | ===Create an array with key/value pairs and dump the contents to the current output=== |
| <code php> | <code php> | ||
| Line 42: | Line 48: | ||
| </ | </ | ||
| - | **Dump some different types of arrays:** | + | ===Dump some different types of arrays=== |
| <code php> | <code php> | ||
| Line 94: | Line 100: | ||
| ) | ) | ||
| </ | </ | ||
| + | |||
| + | ====Note==== | ||
| + | |||
| + | Although this function has other uses, it is most commonly used as a tool for testing and debugging new scripts. | ||
| ====See Also==== | ====See Also==== | ||
| - | [[array()]] - Create an array with values | ||
| - | [[array_key()]] - Return the key for an array index | + | [[array()]] - Create an < |
| + | |||
| + | [[array_key()]] - Return the key for an < | ||
| - | [[array_keys()]] - Return keys for an array that has key/value pairs | + | [[array_keys()]] - Return keys for an < |
| - | [[explode()]] - Turn a string into an array | + | [[explode()]] - < |
| - | [[implode()]] - Turn an array into a string | + | [[implode()]] - < |
| - | [[indexed_array()]] - Create an array of a specific type and size | + | [[indexed_array()]] - Create an < |
| - | [[is_array()]] - Return 1 if the variable is an array | + | [[is_array()]] - Check if a variable is an < |
| - | [[json_encode]] - Encode | + | [[json_encode()]] - < |
| - | [[sizeof()]] - Return the number of elements in an array | + | [[sizeof()]] - Return the number of elements in an < |
| [[uphp: | [[uphp: | ||