Invoeging van assosiatiewe skikking elemente in PHP

Maar invoeging van assosiatiewe skikking elemente sal nie net so werk nie:

php<?php
  $arr = ['a'=>1, 'b'=>2, 'c'=>3];
  echo "xxx $arr['a'] yyy"; // werk nie
?>

Vir die invoeging van sulke elemente moet dit in krulhakies toegedraai word:

php<?php
  $arr = ['a'=>1, 'b'=>2, 'c'=>3];
  echo "xxx {$arr['a']} yyy";
?>

Of jy kan die enkelkwotasies van die sleutel verwyder tydens invoeging:

php<?php
  $arr = ['a'=>1, 'b'=2, 'c'=3];
  echo "xxx $arr[a] yyy";
?>

Soms is dit sinvol om eenvoudig 'n skikking element in 'n veranderlike op te slaan, om dit dan sonder probleme in 'n string in te voeg:

php<?php
  $arr = ['a', 'b', 'c'];
  $elem = $arr['a'];
  
  echo "xxx $elem yyy";
?>
Задание 1

Vereenvoudig die volgende kode:

php<?php
  $arr = ['a' => 1, 'b' => 2, 'c' => 3];
  echo 'text ' . $arr['a'] . ' text ' . $arr['b'] . ' text';
?>