Can someone please help me this is hurting my head, I Cant figure this error out:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/accordd1/public_html/artblock/regfix.php on line 72
Use curly brace "complex" notation for your array elements within the double-quoted string, or else use concatenation.
PHP Code:
// complex notation:
$string = "This is a {$array['sample']} string";
// concatenation:
$string = "This is a " . $array['sample'] . " string";
The other alternative is to remove the quotes from around the array indexes, due to a quirk in the PHP parser. However, I prefer not to do that as it is a bad habit to get into. (See the section entitled "Why is $foo[bar] wrong?" on this page.)
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks