...

View Full Version : { } problems. FCKeditor, please help



shakyfry
11-17-2007, 09:52 PM
I am trying to put the value from my database in the value of the fckeditor but when I do it it gives me array because of the extra set of { } from Value="{$answers[0].about}"

If I remove the first set of brackets the editor doesnt work, If I remove the value brackets, my value from the db doesnt show.

How else can this be done? I would greatly appreciate it.


{fckeditor BasePath="../compose/" Config="../compose/fckconfig.js" InstanceName="about"
Width="450" Height="300" Value="{$answers[0].about}" ToolbarSet= "Default"
SkinPath="$baseurl/compose/editor/skins/office2003/"}

shakyfry
11-18-2007, 04:29 PM
Is this in the wrong section or am I leaving something out?

Fumigator
11-18-2007, 06:46 PM
Is PHP parsing that code you posted?

shakyfry
11-18-2007, 06:48 PM
{fckeditor BasePath="../compose/" Config="../compose/fckconfig.js" InstanceName="about"
Width="450" Height="300" Value=$answers[0].about ToolbarSet= "Default"
SkinPath="$baseurl/compose/editor/skins/office2003/"}

I just need to remove the quotes and brackets from the value.
Thanks for the help lol

kbluhm
11-19-2007, 07:41 PM
Reference sheet for additional characters: http://www.tntluoma.com/sidebars/codes/

Be sure to remove the space between the ampersand and pound signs in the array values, added them to avoid having vB convert them.

<?php

$replace = array
(
'[' => '& #91;',
']' => '& #93;',
'{' => '& #123;',
'}' => '& #125;',
);

$string = str_replace( array_keys( $replace ), array_values( $replace ), $string );

?>

shakyfry
11-19-2007, 09:23 PM
I am not using vb but thanks

kbluhm
11-20-2007, 02:08 AM
Of course not... :rolleyes: I posted that message using vB. Oh man...

Inigoesdr
11-20-2007, 02:17 AM
That first value should have been & #91; I believe.

kbluhm
11-20-2007, 04:50 AM
Ah, you are correct, made the change.

shakyfry
11-20-2007, 07:26 AM
Go roll your eyes and be condescending in someone else's thread jerk. Your response(s) in this thread had absolutely no relation to the question whatsoever.

Inigoesdr
11-20-2007, 07:51 AM
That's a good way to avoid getting help in the future.

kbluhm
11-20-2007, 08:16 AM
Go roll your eyes and be condescending in someone else's thread jerk. Your response(s) in this thread had absolutely no relation to the question whatsoever.

Grow up. You asked in a PHP forum for a solution to remove brackets from the value. I posted a PHP solution that does just that along with a reference for further characters to be added. You're welcome.

:rolleyes: Some people...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum