If I have an ereg that evaluates to false I don't get the $array. Is that normal behavior??
(It is for validating a web-address, so that if the user does not include the http://, then I can tack it on myself before writing to the database.)
If it doesn't match your search pattern then no array is set. You can make the "http://" part optional. I use preg myself, but usually just by surrounding that part of your search with parenthesis and putting a question mark after it. "(https?://)?"
Any reason you're not using parse_url
Thanks mtmosier for the tip! I have been really busy in my department for the past few days, but I will definitely be looking into parse_url() when I get a chance
Thanks 🙂