Skip to content

Instantly share code, notes, and snippets.

View jaywilliams's full-sized avatar
🌱
Waiting for Spring to begin...

Jay Williams jaywilliams

🌱
Waiting for Spring to begin...
View GitHub Profile
@jaywilliams
jaywilliams / gist:125557
Created June 8, 2009 01:06
Parse a string, and convert it into a series of sequential numbers.
<?php
/**
* Parse a string, and convert it into a series of sequential numbers.
* It works similar to Acrobat's print specified pages input box.
*
* Examples:
*
* input: "1, 2, 3, 4, 5, 6" --> output: 1, 2, 3, 4, 5, 6
* input: "1-6" --> output: 1, 2, 3, 4, 5, 6
@jaywilliams
jaywilliams / convert_ascii.php
Created May 28, 2009 19:25
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