| | |
how to manipulate characters in strings
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
i'm unsure if i need to use an array (i'm a newbie to php, the most i've done is make text appear in random color)... anyhow, i want to pass a string to a function that will decrement a color value for each character. here is what i have so far...
thanks
PHP Syntax (Toggle Plain Text)
<? function red($str) { $red = rand(60, 99) /** first 2 of the six hex code numbers * the other 4 will be light grey (neutral) * so the string will fade or darken * from the first red value **/ for (....) // need help here ! echo(....) // i've got this part figured }
•
•
Join Date: Jul 2004
Posts: 494
Reputation:
Solved Threads: 21
for ($i = 0; $i< MAXLOOPS; $i++)or you could use a NULL string in an array to indicate the end and get this:
while ($string[$i] != "") ($i is the string you're looking at now)I'm not 100% sure about the code working, but the idea is sound.
www.uncreativelabs.net
Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
![]() |
Similar Threads
- C++ Programming issue (C++)
- Looking for a better switch without strings is there one? (C++)
- Finding the union of two strings (C++)
- please help! (C++)
- Need example of how to use INHERITANCE! (C++)
- C++ Syntax (C++)
Other Threads in the PHP Forum
- Previous Thread: PDF to HTML conversion--php
- Next Thread: Same problem
| Thread Tools | Search this Thread |
# 5.2.10 action address apache api array auto autoincrement beginner binary broken cakephp checkbox class classes cms code cron curl database date dehasher destroy display dissertation domain dynamic echo echo$_get[x]changingitintovariable... email error errorlog fatalerror file files folder form forms function functions google href htaccess html if-else image images include insert ip javascript joomla legislation limit link load login mail masterthesis menu mlm multiple mysql mysqlquery oop open paypal pdf persist php popup problem query radio random record recursion remote script search server sessions sms sockets source space sql syntax system table tutorial update upload url validator variable video web youtube





