I would like to detect if the first four characters of the string are "http" and based on that decide wheter or not to display URL.

What would be the easiest way to accomplish this? Thank you in advance for any help.

    $string = 'http://www.phpbuilder.com';
    echo substr($string, 0, 4);
    

      Thank you so much!

      That was exactly what I was looking for. I was looking thru the online manual, but it is so hard when you don't know where to even start.

        Good stuff - can you mark the thread a resolved so people know you're done? Click the "thread tools" button above, then "mark thread resolved"

          Write a Reply...