awesomebill61 0 Report post Posted February 22, 2008 this is an error i have dealt with for a long time and it doesn't really make much sense to me.if i am parsing a string, and try to put an array variable in it, it returns an errorexample: echo "This is a variable: $array['var']";that will return an error.I have tried to get around it by doing $array[\'var\']and$array[\"var\"]but those just return different errors. I can get rid of the error by using this:$array[var]but it says right in the php manual that that is a no-nothe only two ways i know to escape are to assign the value to a string variable or to concatenate.$var = $array['var'];echo "This is a variable: $var" echo "This is a variable: " . $array['var']; the first is rather cumbersome with large arrays, and the second is kind of messy the way i see it.does anyone know how to get around this? Share this post Link to post Share on other sites
sonesay 7 Report post Posted February 22, 2008 I dont know what it's called but I came across it somewhere.. cant remember that either lol. anywhere here it is and this is what i use echo"<span class='header'>Title</span> {$rs['title']}"; if I don't use the {} around the array/resource, it won't work. hope that helps ya out and if anyone can shed some light on its former name and use of the {} in this case, it would be appreciated. Share this post Link to post Share on other sites