What I am doing is simple: print all the unicode characters. However, I want there to be alt tags on each character so that I can see what the char's hexidecimal representation is when the mouse cursor hovers over it.
I figured that I could use imagecreate() to make the character into an image with an alt tag but I'm having problems with the imagestring() function. Actually, I think right now, I have some stupid syntactical error that's preventing my code from working. below is the code.
Also, does the GD font support all the characters that I'm looking for?
Thanks, holly
Code: Select all
<?php
$a = 0;
$b = 0;
$c = 0;
$d = 0;
$i = 0;
for($count = 0; $count <= 50000; $count++) {
$i = dechex($count);
$iToUnicode = "&#x$i;";
$imgNum = "\$img$i";
$textColor = "#000000";
$row = $count / 35;
//$col = (($i / 6) + 1;
$rowX = $row + 6 + (6 * $row);
$rowY = $row + 6 + ($i );
//ImageString($imgNum, 3,
$theIm = imagestring($imgNum, 4, $rowX, $rowY, "$iToUnicode", $textColor);
print("<img src=$theIm alt=$i>");
//print("&#x$i;</a> | ");
if(!$count % 34) print("<br>");
}
?>