print a-z

I need to create a link from a to z. I come up with a simple way to do it.

/* a-z */
$str = '';
for($i = 65; $i < 91; ++$i)
echo ''.chr($i).'';

another way

$a = range('a', 'z');
foreach($a as $chr) echo $chr;

Advertisements

Published by

paragasu

Different. In a good way

2 thoughts on “print a-z”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s