Created
May 5, 2019 06:55
-
-
Save juliankoehn/215876a84f4a2c0ad3b4d9cf2cd93a9d to your computer and use it in GitHub Desktop.
Simple UTF8 Converter Function (used for JTL -> Laravel (Latin1 to UTF8)
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
<?php | |
public function convertToUtf8 ($el) { | |
if (is_array($el)) { | |
foreach ($el as $key => $value) { | |
if (is_array($el[$key])) { | |
$el[$key] = $this->convertToUtf8($value); | |
} else { | |
$el[$key] = utf8_encode($value); | |
} | |
} | |
return $el; | |
} else { | |
return utf8_encode($el); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment