• Index » 
  • Community » 
  • Tech » 
  • I hoped this was the right section anyway... [PHP help]
brome
brap.
+244|6599|Accidental, TK
to all you leet php haxxors (chuy)
I'm fiddling around with making a script that can apply a colour gradient to text and churns it out in html and bbcode.  I've got most of it working, except that I need a way to select each character individually from a string.  I can't use str_split() because my host's servers only run php 4.2 or something and that's a php 5 command.  I've tried borrowing other people's custom functions, without much luck.

Any help much appreciated
cheers
[2MC]Golarin
Member
+6|6561
uh, dude. this is the right place, but you havent gotten any hits.

Try here.
http://www.htmlforums.com/forumdisplay.php?f=44

and Karma me if it helps
brome
brap.
+244|6599|Accidental, TK
this question was aimed at one of the admins, or anybody who's good with PHP.  I can use google; thanks but no thanks. And i give karma when i feel like it.
Viper007Bond
Moderator Emeritus
+236|6818|Portland, OR, USA

You realize there's a bazillion scripts out there already to do color gradients, right?

Anyway, this is the best method I could come up with.

Code:

<?php

$str = 'abc';

$count = 0;
while ($count < strlen($str)) {
    $letters[] = $str[$count];
    $count++;
}

echo '<pre>';
print_r($letters);

?>
https://bf3s.com/sigs/044900892044e7fc95e599e832a086ae9bcd7efb.png
OrangeHound
Busy doing highfalutin adminy stuff ...
+1,335|6661|Washington DC

Looks like he figured it out.

Nothing more to see here people ... move along.   
  • Index » 
  • Community » 
  • Tech » 
  • I hoped this was the right section anyway... [PHP help]

Board footer

Privacy Policy - © 2024 Jeff Minard