title: explode only the first '='
body: <p>I need to explode a .txt file with a lot of lines, these lines are described like this:</p>
  
  <pre><code>achievements.levelup.desc=You unlocked the Achievement
  achievements.levelup.ok=OK
  achievements.levelup.reward=Reward: &lt;b&gt;&lt;font size="30" color="#7adde9"&gt;%amount%&lt;/font&gt;&lt;/b&gt; %currency_name%
  </code></pre>
  
  <p>Now that the problem is, is the second and third <code>=</code> inside the third line.</p>
  
  <p>It is that it's also exploding on those <code>=</code> es.</p>
  
  <p>How i'm now exploding, is like this:</p>
  
  <pre><code>&lt;?php
  $array = explode("=", $data, 2);
  ?&gt;
  </code></pre>
  
  <p>UPDATE: added more code</p>
  
  <p>INDEX.php</p>
  
  <pre><code>&lt;?php
  require_once('reader.class.php');
  ?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;External Variables Uitlezen&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;center&gt;
      &lt;br&gt;&lt;br&gt;
      &lt;br&gt;&lt;br&gt;
      &lt;form action="" method="get"&gt;
          &lt;label&gt;Hoeveel rijen wil je zien?&lt;/label&gt;
          &lt;input type="number" name="amount"&gt;
          &lt;input type="submit" name="enterRows" value="Verder"&gt;
      &lt;/form&gt;
      &lt;br&gt;&lt;br&gt;
      &lt;hr&gt;
      &lt;br&gt;&lt;br&gt;
      &lt;?php
      $fileName = "external_flash_texts.txt";
      $extReader = new Ext_Var($fileName);
      $extReader-&gt;SetContent();
      if (!isset($_POST['opslaan']) &amp;&amp; empty($_POST['opslaan'])) {
          if (isset($_GET['enterRows']) &amp;&amp; !empty($_GET['enterRows'])) {
              echo '&lt;form action="" method="post"&gt;';
              echo $extReader-&gt;GetContent($_GET['amount']);
              echo '&lt;input type="submit" name="opslaan" value="Opslaan"&gt;';
              echo '&lt;/form&gt;';
          } else {
              echo '&lt;form action="" method="post"&gt;';
              echo $extReader-&gt;GetContent(10);
              echo '&lt;input type="submit" name="opslaan" value="Opslaan"&gt;';
              echo '&lt;/form&gt;';
          }
      } else {
          $extReader-&gt;Save($_POST);
      }
      ?&gt;
  &lt;/center&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>reader.class.php</p>
  
  <pre><code>&lt;?php
  class Ext_Var {
      //File info
      private $_fName;
      private $_fHandler;
      //File content
      private $_content = [];
      //New file content
      private $_newContent;
      //Read file
      public function __construct($file) {
          $this-&gt;_fName = $file;
          $this-&gt;_fHandler = fopen($this-&gt;_fName, "r");
      }
      public function SetContent() {
          while ($data = fgets($this-&gt;_fHandler)) {
              $array = explode("=", $data, 2);
              $this-&gt;_content[$array[0]] = $array[1];
          }
      }
      public function GetContent($caller) {
          $counter = 1;
          $content = "";
          foreach ($this-&gt;_content as $field =&gt; $value) {
              if ($counter &lt;= $caller) {
                  $content .= "&lt;p&gt;&lt;label&gt;" . $field . "&lt;/label&gt; = &lt;input type='text' name='" . $field . "' value='" . $value . "'&gt;&lt;/p&gt;";
                  $counter++;
              }
          }
          return $content;
      }
      public function Save($array) {
          if (isset($array) &amp;&amp; !empty($array)) {
              foreach($this-&gt;_content as $field =&gt; $value) {
                  if (isset($array["$field"]) &amp;&amp; !empty($array["$field"])) {
                      $this-&gt;_newContent .= $field . "=" . $array["$field"] . "\n";
                  } else {
                      $this-&gt;_newContent .= $field . "=" . $value;
                  }
              }
              if (file_put_contents($this-&gt;_fName, $this-&gt;_newContent)) {
                  header("Location: ?msg=Succes");
              } else {
                  echo 'fout';
              }
          }
      }
  }
  ?&gt;
  </code></pre>