Question: array = ["£179.95", "£199.95", "£89.95"]

How to multiple this values add get the total values in ios swift 4.

Please help me.

Answer: 
Try this. This will Works.

```
$a = 1;
$x = 1;
$array = [];
$array[] = array(
    'name' => 'name',
    'type' => 'type',
    'label' => 'label',
);
if( $a == $x ){
  $array[] =  array(
      'name' => 'name',
      'type' => 'type',
      'label' => 'label',
  );
}
$array[] =  array(
  'name' => 'name',
  'type' => 'type',
  'label' => 'label',
);

```

**OUTPUT:**

```
Array
(
    [0] => Array
        (
            [name] => name
            [type] => type
            [label] => label
        )

    [1] => Array
        (
            [name] => name
            [type] => type
            [label] => label
        )

    [2] => Array
        (
            [name] => name
            [type] => type
            [label] => label
        )

)

```
Hope help:

```
$a = 1;
$x = 1;

$array = array(
    array(
        'name' => 'name',
        'type' => 'type',
        'label' => 'label',
    ),

    array(
      'name' => 'name',
      'type' => 'type',
      'label' => 'label',
    ),
);

if ( $a === $x ) {

    $array[] = array(
        'name' => 'name',
        'type' => 'type',
        'label' => 'label',
    );
}

print_r($array);

```