I'm having some very strange issues with the textwidth function. If I try and input a variable into the function like this:
PHP Code:
foo = "some text here";
len = textwidth(1, "Verdana", "b", foo);
it will always output the same value no matter what the text is in the variable (in my case, 74).
However, if I use a string literal, like this:
PHP Code:
len = textwidth(1, "Verdana", "b", "some text here");
It will work properly.
Anybody know what I'm doing wrong here? I've checked the variables value over and over, it's nothing to do with that, I don't think.