title: Changing a style in CSS file using PHP
body: <p>This is the problem I have: I am making a CSS editor for website administrators, but only for certain styles. What I need is a way to find a word or a phrase in the CSS file (the title of the style), and then change its content. So, in other words, if I have this code:</p>
  
  <pre><code>.test_style {
  font-size:12px;
  color:#ffffff;
  }
  </code></pre>
  
  <p>and the administrator chooses the style </p>
  
  <blockquote>
    <p>test_style</p>
  </blockquote>
  
  <p>and writes this:</p>
  
  <pre><code>font-size:16px;
  color:#000000;
  font-weight:bold;
  margin-top:5px;
  </code></pre>
  
  <p>the PHP script should find the corresponding style, and change the content to this:</p>
  
  <pre><code>.test_style {
  font-size:16px;
  color:#000000;
  font-weight:bold;
  margin-top:5px;
  }
  </code></pre>
  
  <p>Does anyone have any ideas how I could do this?</p>
  
  <p>EDIT:  My idea is to let administrators choose a selector from a drop-down menu, write the code in a textarea, and then save the code they write into that specific style in the CSS file.</p>