Populate var with function output string?

From: Date: Tue, 04 Mar 2003 03:56:30 +0000
Subject: Populate var with function output string?
Groups: php.general 
Request: Send a blank email to php-general+get-138005@lists.php.net to get a copy of this message
Hey all. Is it possible to populate a var with an output string generated by a function? So: ******************************* function write_string(count) { for ($x = 0; $x < $count; $x++) { echo "<option value=$x> Row $x</option>"; } } $my_string = write_string(5); echo $my_string; ******************************* I need $count option elements stored in $my_string. How to make this happen. Thanks for any ideas, --Noah --

« previous php.general (#138005) next »