Voting

: max(four, four)?
(Example: nine)

The Note You're Voting On

jordanslost at gmail
15 years ago
Here is a small bit I made for writing to a image from right to left when you are limited to imagestring()

<?php

$pageview_letters
= preg_split('//', $string, -1 ); // Form are original array of letters.
$minus = 6; // The letter spacing in pixels
$first = true; // Whether or not we have started the string
$x = 375; // X Location of imagestring
$y = 23; // Y Location of imagestring
$letters = array(); // Initiate the array o letters.

foreach ( $pageview_letters as $letter ) {

$letters[] = $letter;

}

$letters = array_reverse( $letters );

foreach (
$letters as $letter ) {

if (
$first ) {

imagestring( $image, 2, $x, $y, $letter, $light_blue );
$first = false;

} else {

$x = ( $x - $minus );
imagestring( $image, 2, $x, $y, $letter, $light_blue );

}

}
?>

<< Back to user notes page

To Top