|
Posted by J.O. Aho on 05/23/07 04:43
christopher.j.just@gmail.com wrote:
> On May 22, 12:18 pm, christopher.j.j...@gmail.com wrote:
>> I'm getting a parse error - parse error, unexpected
>> T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' - on this line of
>> code:
>>
>> "oFCKeditor.Value = "; echo preg_replace"(\"/\r\n/\", \"\\n\",
>> addslashes(\"" . $VAR . "\"))";
>>
>> it is part of a larger block:
>>
>> if (!empty($query_data['VAR'])) {
>> echo "<table width=\"85\" border=\"0\" cellpadding=\"0\" cellspacing=
>> \"0\">\n".
>> "<tr>
>> <td scope=\"col\"> </td>\n".
>> "<td scope=\"col\"><b>TEXT </b></td>\n".
You use a quite messy way to echo out your data, it can be much easier if you
store result from functions into variables and then use
echo <<<EOF
<your html tags>{$values_you_want_to_inject_into_the_html}</more html tags>
EOF;
That way you can use " without any escape character before and you see things
a lot easier.
--
//Aho
Navigation:
[Reply to this message]
|