title: How to display multiple images from database into unity
body: <p>I have 4 images in my database and I want to display all 4 of them in unity. What I am doing is that I am using base64_encode function in php to display my image as a string in browser and then unity is converting that string into an image but the problem is that it is treating string of all 4 images and as 1 and only showing the first one.</p>
  
  <p>I have tried separating string by <br> in php but unity can't understand line changing and I have no idea how to separate them. Once they are separated ik I can make a string array and save them in it. </p>
  
  <pre><code>&lt;?php
      $servername = "localhost";
      $username = "root";
      $password = "";
      $dbName = "picture";
  
      //Make connection
      $conn = new mysqli($servername, $username, $password, $dbName);
      //Check connection
      if(!$conn)
      {
          die("Connection failed.". mysqli_connect_error());
      }
      //
      //else echo("Connection success") . "&lt;br&gt;";;
  
      $sql = "SELECT * FROM images";
      $result = mysqli_query($conn, $sql);
  
      if(mysqli_num_rows($result) &gt; 0)
      {
          //show data for each row
          while($row = mysqli_fetch_assoc($result))
          {
              //echo '&lt;img src="data:image/jpeg;base64,'.base64_encode($row['pics']).'"/&gt;';
              echo "".base64_encode($row['pics']);
          }
      }
  ?&gt;
  </code></pre>
  
  <pre><code>private string imageString = "";
  
      private void Start()
      {
          StartCoroutine(GetImage());
      }
  
  
      IEnumerator GetImage()
      {
          WWWForm imageForm = new WWWForm();
          WWW wwwImage = new WWW("http://localhost/Insert_Images/index.php");
          yield return wwwImage;
          imageString = (wwwImage.text);
      }
  
      private void OnGUI()
      {
          byte[] Bytes = System.Convert.FromBase64String(imageString);
          Texture2D texture = new Texture2D(1, 1);
          texture.LoadImage(Bytes);
          GUI.DrawTexture(new Rect(200, 20, 440, 400), texture, ScaleMode.ScaleToFit, true, 1f);
      }
  </code></pre>
  
  <p>The result should be 4 separate images but it is only showing one.</p>
  
  <p><a href="https://i.stack.imgur.com/LIf9g.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LIf9g.png" alt="the only image"></a></p>