SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Dec 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Rendering this correctly.

    Hey guys I'm trying to display this, actually the text appear but is not wrapped with the divs. Any ideas?

    Code:
    <?php if($my_options['ivor_home_tagline_enable'] == 'true'){
    
         $output .= '<div id="testimonials">'."\n";
         $output .= '<h3>'."\n";
    					
    	echo stripslashes($my_options['ivor_home_tagline']);
    						
         $output .= '<h3>'."\n";
         $output .= '</div>'."\n";
    }  ?>

  2. #2
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    where are you echoing out $output?

  3. #3
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,420
    Mentioned
    160 Post(s)
    Tagged
    1 Thread(s)
    $output isn't defined ??

  4. #4
    SitePoint Member
    Join Date
    Dec 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My question is who can I wrap the below code with divs. (The div will appear only if the checkbox is enabled)

    Code PHP:
    <?php if($my_options['ivor_home_tagline_enable'] == 'true'){
          echo stripslashes($my_options['ivor_home_tagline']);
    }  ?>

    Sorry if I'm not being specific my php isn't that great.


    @Mittineague Actually yes, output is defined
    Code:
    $output = '';

  5. #5
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    PHP Code:
    $output .= stripslashes($my_options['ivor_home_tagline']); 
    Edit:

    forgot to say, replace your echo line with that instead.

  6. #6
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ivorpad View Post
    My question is who can I wrap the below code with divs. (The div will appear only if the checkbox is enabled)


    Sorry if I'm not being specific my php isn't that great.
    and my question was where are you echoing out $output?


Bookmarks

Posting Permissions

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