title: saving image in byte array in php
body: <p>how can save an image file into byte array. i post the image file  to server as base64. and tehn convert to jpg. but i dont know how can convert to bytearray from JPG</p>
  
  <pre><code>$base=$_POST["image"];
  
  $binary=base64_decode($base);
  $file = fopen("image.jpg", "w");
  fwrite($file, $binary);
  fclose($file);
  </code></pre>