Skip to content

Instantly share code, notes, and snippets.

Avatar

Noah Overcash ncovercash

View GitHub Profile
@ncovercash
ncovercash / buildMultipartFormData.php
Created Sep 22, 2017 — forked from ssigwart/buildMultipartFormData.php
Build multipart/form-data in PHP
View buildMultipartFormData.php
<?php
/**
* Build multipart/form-data
*
* @param array @$data Data
* @param array @$files 1-D array of files where key is field name and value if file contents
* @param string &$contentType Retun variable for content type
*
* @return string Encoded data
*/