/ Published in: PHP

This is a simple 'text to array for output' script that I've used a few times for my clients. Hope you like!
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php //locate file for collection /* this user file (links.txt) is simply a series of URLS, each on one line like so: www.xxxxxxx.org www.yyymmmzzz.com www.someotherurl.com */ //explode each line of hte links.txt file directly into an array //sort($links) or shuffle($links) or whatever this array //output the array for display. foreach ($links as $text) { echo '<a href="http://' . $text .'">' . $text . '</a><br />' . " \n"; } ?>
Comments
