title: How do I declare a variable in PHP without displaying its value in my html?
body: <p>I am working in a Wordpress website and I need to pass the url of a page as a argument of a function. In this case I am using</p>
  
  <pre><code>bloginfo('url');
  </code></pre>
  
  <p>to retrieve the base url of the site.</p>
  
  <p>So my code is</p>
  
  <pre><code>&lt;?php 
  
  $portfolio_link = bloginfo('url');
  
  if ( ! function_exists( 'ow_nav' ) ) {
      function ow_nav( $nav_position ) {
          ?&gt;
          &lt;nav id="ow-nav-&lt;?php echo $nav_position; ?&gt;" class="ow-nav clearfix ow-nav-&lt;?php echo $nav_position; ?&gt;"&gt;
              &lt;ul class="ow-nav-list"&gt;
                  &lt;?php ow_nav_item( '#home',         'Home'                ); ?&gt;
                  &lt;?php ow_nav_item( '#about',        'About'               ); ?&gt;
                  &lt;?php ow_nav_item( '#criteria',     'Investment Criteria' ); ?&gt;
                  &lt;?php ow_nav_item( '#approach',     'Approach'            ); ?&gt;
                  &lt;?php ow_nav_item( '#team',         'Team'                ); ?&gt;
                  &lt;?php ow_nav_item( $portfolio_link, 'Portfolio'           ); ?&gt;
              &lt;/ul&gt;
          &lt;/nav&gt;
          &lt;?php
      }
  }
  
  if ( ! function_exists( 'ow_nav_item' ) ) {
      function ow_nav_item( $link, $text ) {
          ?&gt;
          &lt;li&gt;
              &lt;a href="&lt;?php echo $link; ?&gt;"&gt;
                  &lt;span class="ow-txt"&gt;&lt;?php echo $text; ?&gt;&lt;/span&gt;
                  &lt;span class="ow-dot"&gt;&lt;/span&gt;
              &lt;/a&gt;
          &lt;/li&gt;
          &lt;?php
      }
  }
  </code></pre>
  
  <p>But when I do that, that variable gets leaked in my HTML, displaying the url in a random place in the DOM.</p>
  
  <p>Any ideas?</p>