Hi everyone,
I'm trying to find an alternative to strlen(), and I'm wondering if someone can help....
I'm doing a select nextval('sequence') from a database and I need it to determine the exact string length and add the appropriate letter. Like...
if(strlen($num) = 1) {
$finalnum = "abc"."$num";
}
if(strlen($num) = 2) {
$finalnum = "ab"."$num";
}
if(strlen($num) = 3) {
$finalnum = "a"."$num";
}
Problem is that strlen() doesn't work with the "=". Anyone know another way to do this or maybe a way around this?
Thanks!