Hello all๐Ÿ™‚
I need help with a function. I would like a function that tests the string length. IF this length is 4 intergers long I would like to add a '0' in front. Any help would be appreciated.
Tracy

    Thanks Trey!
    Function convert ($id){
    if (strlen($id)==4){
    $id="0".$id;
    return $id;
    }
    }

      Is this only if it's 4 long? If you were just looking to pad the string with zeros, you could use [man]str_pad[/man]...

        Write a Reply...