RE: [PHP] Dynamic function calls within the echo function, possible?
| From: | Jay Blanchard | Date: | Tue, 20 Jul 2004 00:41:50 +0000 |
| Subject: | RE: [PHP] Dynamic function calls within the echo function, possible? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-191095@lists.php.net to get a copy of this message | ||
[snip]
Well that could work, but i want to re call it every time it finds the
occurance of $row
if you said $row = row_color();
then echo "$row<br>$row<br>$row";
it would output the content of $row1 three times.
Because $row =row_color calls it, defines the returned value of row_color as
the contents of it, and never calls it again. I need it to dynamicly call it
every time around.
[/snip]
Top posting == bad
replying off list == bad
Then loop through the rows with either a for loop or while loop.
while(TRUE === $row){
echo row_color($row) . "<br>";
}