getid3_lib::CreateDeepArray

Advertisement

Syntax Syntax

getid3_lib::CreateDeepArray( string $ArrayPath, string $Separator, mixed $Value )

Parameters Parameters

$ArrayPath

(string) (Required)

$Separator

(string) (Required)

$Value

(mixed) (Required)

Return Return

(array)

Source Source

File: wp-includes/ID3/getid3.lib.php

		// is the same as:
		//   $foo = array('path'=>array('to'=>'array('my'=>array('file.txt'))));
		// or
		//   $foo['path']['to']['my'] = 'file.txt';
		$ArrayPath = ltrim($ArrayPath, $Separator);
		if (($pos = strpos($ArrayPath, $Separator)) !== false) {
			$ReturnedArray[substr($ArrayPath, 0, $pos)] = self::CreateDeepArray(substr($ArrayPath, $pos + 1), $Separator, $Value);
		} else {
			$ReturnedArray[$ArrayPath] = $Value;
		}
		return $ReturnedArray;
	}

	/**
	 * @param array $arraydata

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.