title: Changing Text in PHP
body: <p>I haven't found anytihng in Google or the PHP manual, believe it or not. I would've thought there would be a string operation for something like this, maybe there is and I'm just uber blind today...</p>
  
  <p>I have a php page, and when the button gets clicked, I would like to change a string of text on that page with something else.</p>
  
  <p>So I was wondering if I could set the <code>id=""</code> attrib of the <code>&lt;p&gt;</code> to id="something" and then in my php code do something like this:</p>
  
  <pre><code>&lt;?php
      $something = "this will replace existing text in the something paragraph...";
  ?&gt;
  </code></pre>
  
  <p>Can somebody please point me in the right direction? As the above did not work.</p>
  
  <p>Thank you :)</p>
  
  <p><B>UPDATE</B>
  <hr />
  I was able to get it working using the following sample:</p>
  
  <p>Place this code above the <code>&lt;html&gt;</code> tag:</p>
  
  <pre><code>&lt;?php
  $existing  = "default message here";
      $something = "message displayed if form filled out.";
      $ne = $_REQUEST["name"];
  
      if ($ne == null) {
        $output = $existing;
      } else {
        $output = $something;
      }
  ?&gt;
  </code></pre>
  
  <p>And place the following where ever your message is to be displayed:</p>
  
  <pre><code>&lt;?php echo $output ?&gt;
  </code></pre>