I'm getting an error trying to make this
$array = array("text"); echo "text $array['0']"; it's possible to make it shis way instead concatenate
echo "text ".$array['0']; ["a"] to [a] but if write [a] it treat as constant and convert with the constant value. so its depends how you write and how it convert before execution. Thanks for comment.1. You need to remove ' around 0
echo "text $array[0]"; Output:- https://eval.in/993458
2.Or enclose array element with {}
echo "text {$array['0']}"; Output:-https://eval.in/993460
echo "text ".$array['0'];should work{ }-echo "text {$array['0']}";