[PHP] Review: Function that measures the width of a text string in pixels.

2004-10-28 Thread Jacob Friis
I have created a function that will measure the width of a text string in pixels. It works ok. If you have optimizations, please let me know. Thanks, Jacob function txt_width ($txt) { $width = 0; $txt_len = strlen($txt); for ($n = 1; $n = $txt_len; $n++) {

Re: [PHP] Review: Function that measures the width of a text string in pixels.

2004-10-28 Thread Robby Russell
On Fri, 2004-10-29 at 00:11 +0200, Jacob Friis wrote: I have created a function that will measure the width of a text string in pixels. It works ok. If you have optimizations, please let me know. Thanks, Jacob function txt_width ($txt) { $width = 0; $txt_len = strlen($txt);