Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Inventory_Presser_Customize_Dashboard::array_to_csv( array $arr )

array_to_csv


Description Description

Converts a one-dimensional array into an equivalent comma-separated v values string. Input of array( 1, 2, 3 ) returns "1","2","3"


Top ↑

Parameters Parameters

$arr

(array) (Required)


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/class-customize-admin-dashboard.php

	private function array_to_csv( $arr )
	{
		$csv = '';
		foreach( $arr as $item )
		{
			$csv .= "\"" . str_replace( "\"", "\"\"", $item ) . "\",";
		}
		//ignore last comma
		return substr( $csv, 0, -1 );
	}