RE: [PHP] Handling Code Continuation
Curt Zirzow mailto:[EMAIL PROTECTED] on Friday, June 25, 2004 9:29 PM said: In general practice, and depending on how much html you're outputing: function input($type,$size,$name,$value) { ?php input type=php echo $type? size=?php echo $size? value=?php echo $value? name=?php echo $name? } you must have been really worn out when you wrote that curt. :P chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Handling Code Continuation
Hi everyone, I would like to know how to handle code breaks or code blocks that takes up more than two lines. For readability, I would like to know if there is something like the following: function input($type,$size,$name,$value) { return input type=\$type\ size=\$size\ value=\$value\ name=\$name\; } Thanks. -gohaku -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Handling Code Continuation
On Fri, 25 Jun 2004 22:13:03 -0400, gohaku [EMAIL PROTECTED] wrote: Hi everyone, I would like to know how to handle code breaks or code blocks that takes up more than two lines. For readability, I would like to know if there is something like the following: function input($type,$size,$name,$value) { return input type=\$type\ size=\$size\ value=\$value\ name=\$name\; } function input($type,$size,$name,$value) { return EOF input type=$type size=$size value=$value name=$name EOF; } -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Handling Code Continuation
gohaku wrote --- napĂsal:: Hi everyone, I would like to know how to handle code breaks or code blocks that takes up more than two lines. For readability, I would like to know if there is something like the following: function input($type,$size,$name,$value) { return input type=\$type\ size=\$size\ value=\$value\ name=\$name\; } Thanks. -gohaku function input($type,$size,$name,$value) { return input type=\$type\ size=\$size\ value=\$value\ . name=\$name\; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Handling Code Continuation
* Thus wrote gohaku: Hi everyone, I would like to know how to handle code breaks or code blocks that takes up more than two lines. you just might start a war of the gods here For readability, I would like to know if there is something like the following: function input($type,$size,$name,$value) { return input type=\$type\ size=\$size\ value=\$value\ name=\$name\; } In general practice, and depending on how much html you're outputing: function input($type,$size,$name,$value) { ?php input type=php echo $type? size=?php echo $size? value=?php echo $value? name=?php echo $name? } But on the other hand a different approach: $field = array( 'type' = $type, 'size' = $size, 'value' = $value, 'name' = $type, 'id'= $id, /* forgot this one :) */ ); echo 'input '; foreach($field as $name = $value ) { echo $name=\$value\ } echo ''; Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php