Profile
Achievement
jmiller's Recent PHP Snippets
- All /
« Prev 1 Next »
This will get the 11-character YouTube video ID from any valid YouTube URL.
Based on http://snipplr.com/view/57065/get-youtube-video-id/ but made more robust to handle additional URL inputs
0
1271
posted 12 years ago by jmiller
Turns /n to <br> and /n/n to </p><p>
Usage:
echo stripslashes(nl2br(nls2p($text)));
0
598
posted 13 years ago by jmiller
Orders a multi-dimensional field (such as sorting multiple $orders by field 'id')
0
719
posted 13 years ago by jmiller
Will strip off the decimals of a number (price) unless they are necessary.
0
527
posted 14 years ago by jmiller