Skip to content

Instantly share code, notes, and snippets.

@osbragon
osbragon / convert_ascii.php
Created February 17, 2017 09:30 — forked from codler/convert_ascii.php
This simple function will remove any non-ASCII character. Feel free to fork and extend!
<?php
/**
* Remove any non-ASCII characters and convert known non-ASCII characters
* to their ASCII equivalents, if possible.
*
* @param string $string
* @return string $string
* @author Jay Williams <myd3.com>
* @license MIT License
* @link http://gist.github.com/119517