Function __global->split_street_address
Definitions
sources/ecommerce.php
- Split a linebreak-separated street address into individual parts.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $compound_street_address | string | No | No | required parameter | N/A | N/A | Linebreak-separated street address |
| $num_parts | integer | No | No | required parameter | N/A | N/A | Number of parts to split into (the last will have comma-separated parts of whatever is remaining) |
| $find_company_name | boolean | No | No | False | N/A | N/A | The first part will be for a company name, which we'll try and detect intelligently but will be blank if we're not sure |
Returns
- Parts
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Split a linebreak-separated street address into individual parts.
*
* @param string $compound_street_address Linebreak-separated street address
* @param integer $num_parts Number of parts to split into (the last will have comma-separated parts of whatever is remaining)
* @param boolean $find_company_name The first part will be for a company name, which we'll try and detect intelligently but will be blank if we're not sure
* @return array Parts
*/
function split_street_address(string $compound_street_address, int $num_parts, bool $find_company_name = false) : array
* Split a linebreak-separated street address into individual parts.
*
* @param string $compound_street_address Linebreak-separated street address
* @param integer $num_parts Number of parts to split into (the last will have comma-separated parts of whatever is remaining)
* @param boolean $find_company_name The first part will be for a company name, which we'll try and detect intelligently but will be blank if we're not sure
* @return array Parts
*/
function split_street_address(string $compound_street_address, int $num_parts, bool $find_company_name = false) : array

