This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Read a csv file and return the content in an array | |
* | |
* @param string $filename | |
* @param string $delimiter | |
* @return array | |
*/ | |
private function _convertCsvFileToArray($filename, $delimiter) | |
{ | |
$result = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Search a value in a array using a case insensitive check | |
* similar to array_search() but case insensitive | |
* | |
* @param $search | |
* @param array $array | |
*/ | |
private function arraySearchInsensitive($search, array $array) | |
{ | |
foreach ($array as $key => $value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array_map('trim',explode(",",$str)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Web.Mvc; | |
using System.Web.Script.Serialization; | |
namespace Web.Helpers | |
{ | |
public static class ExtensionMethods | |
{ | |
public static MvcHtmlString ToJson(this HtmlHelper html, object obj) | |
{ | |
JavaScriptSerializer serializer = new JavaScriptSerializer(); |