Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New Coder
    Join Date
    Sep 2007
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    { } problems. FCKeditor, please help

    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.

    Code:
    {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/"}

  • #2
    New Coder
    Join Date
    Sep 2007
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is this in the wrong section or am I leaving something out?

  • #3
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Is PHP parsing that code you posted?

  • #4
    New Coder
    Join Date
    Sep 2007
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    {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

  • #5
    Senior Coder kbluhm's Avatar
    Join Date
    Apr 2007
    Location
    Philadelphia, PA, USA
    Posts
    1,509
    Thanks
    3
    Thanked 258 Times in 254 Posts
    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 Code:
    <?php

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

    $string str_replacearray_keys$replace ), array_values$replace ), $string );

    ?>
    Last edited by kbluhm; 11-20-2007 at 03:49 AM. Reason: Correcting the first #93 for #91.

  • #6
    New Coder
    Join Date
    Sep 2007
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am not using vb but thanks

  • #7
    Senior Coder kbluhm's Avatar
    Join Date
    Apr 2007
    Location
    Philadelphia, PA, USA
    Posts
    1,509
    Thanks
    3
    Thanked 258 Times in 254 Posts
    Of course not... I posted that message using vB. Oh man...

  • #8
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    That first value should have been & #91; I believe.

  • #9
    Senior Coder kbluhm's Avatar
    Join Date
    Apr 2007
    Location
    Philadelphia, PA, USA
    Posts
    1,509
    Thanks
    3
    Thanked 258 Times in 254 Posts
    Ah, you are correct, made the change.

  • #10
    New Coder
    Join Date
    Sep 2007
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #11
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    That's a good way to avoid getting help in the future.

  • #12
    Senior Coder kbluhm's Avatar
    Join Date
    Apr 2007
    Location
    Philadelphia, PA, USA
    Posts
    1,509
    Thanks
    3
    Thanked 258 Times in 254 Posts
    Quote Originally Posted by shakyfry View Post
    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.

    Some people...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •