For example:
<?php
$text="/p hello";
$a= explode("/",$text);
$a=$a[1];
echo $a;
?>
works, however:
<?php
$text="/p hello";
$a= explode("/",$text)[1];
echo $a;
?>
results in a syntax error. In python you can just treat a recall to a function that returns a list/array as a list/array. Is this the same for php?