title: How to call one line of text from a php file to use in another?
body: <p>I'm trying to use the title of an article in one place and be able to place it anywhere by calling it from the php file.</p>
  <p>I tried to include the code from news.php and echo it in the footer, but it doesn't seem to work. What am I doing wrong?</p>
  <p>news.php</p>
  <pre><code>&lt;div class=&quot;entry-title&quot;&gt;
      &lt;h4&gt;
          &lt;a href=&quot;news/news-article-5-21-2019&quot;&gt;
              &lt;?php $str1 = &quot;NEWS TITLE&quot; ?&gt;&lt;/a&gt;
      &lt;/h4&gt;
  &lt;/div&gt;
  </code></pre>
  <hr />
  <p>footer.php</p>
  <pre><code>&lt;div class=&quot;entry-title&quot;&gt;
      &lt;h4&gt;
          &lt;a href=&quot;news/news-article-5-21-2019&quot;&gt;
              &lt;?php include
              'news.php';
              echo $str1;
              ?&gt;&lt;/a&gt;
      &lt;/h4&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I expected footer.php to output the &quot;NEWS TITLE&quot; from news.php, but didn't get anything.</p>