lp__init_array( $value, $separator="," )

This function is designed to convert a comma-separated string into an array. It allows you to provide a string as input and specify an optional separator (default is ,) to split the string into array elements.

Plugin

Namespace

Launchpad

Parameters

string

$value

The input string to be converted into an array.

string

$separator

(Optional) The separator used to split the input string into array elements. Default is “,”.

Return

array

The resulting array after converting the input string.

Source

File: \includes\lp-utility-functions.php

function lp__init_array( $value, $separator="," ){
    return $value !== "" && is_string( $value ) ? explode($separator, $value) : array();
}

Related

Used to to retrieve the value of a property from an object.

Use to initializes an integer value based on the given input value.