FML/Script/Builder.php
public static function getArray(array $array, $associative = true)
    {
        $arrayText = "[";
        $index     = 0;
        $count     = count($array);
        foreach ($array as $key => $value) {
            if ($associative) {
                $arrayText .= static::getValue($key);
                $arrayText .= " => ";
            }
            $arrayText .= static::getValue($value);
            if ($index < $count - 1) {
                $arrayText .= ", ";
                $index++;
            }
        }
        return $arrayText . "]";
    }
public static function getArray(array $array, $associative = true)
    {
        $arrayText = "[";
        $index     = 0;
        $count     = count($array);
        foreach ($array as $key => $value) {
            if ($associative) {
                $arrayText .= static::getValue($key);
                $arrayText .= " => ";
            }
            $arrayText .= static::getValue($value);
            if ($index < $count - 1) {
                $arrayText .= ", ";
                $index++;
            }
        }
        return $arrayText . "]";
    }
public static function getArray ( array $ array , $ associative = true ) { $ arrayText = "[" ; $ index = 0 ; $ count = count ( $ array ) ; foreach ( $ array as $ key => $ value ) { if ( $ associative ) { $ arrayText .= static :: getValue ( $ key ) ; $ arrayText .= " => " ; } $ arrayText .= static :: getValue ( $ value ) ; if ( $ index < $ count - 1 ) { $ arrayText .= ", " ; $ index ++ ; } } return $ arrayText . "]" ; }
Get the string representation of the given array

@api
@param array $array       Array to convert to a ManiaScript array
@param bool  $associative (optional) Whether the array should be associative
@return string
Get the string representation of the given array