PHP: How to check if a string starts with a specified string?

Posted by Andrew on Stack Overflow See other posts from Stack Overflow or by Andrew
Published on 2010-05-07T18:43:37Z Indexed on 2010/05/07 18:48 UTC
Read the original article Hit count: 153

Filed under:

I'm trying to check if a string starts with http. How can I do this check?

$string1 = 'google.com';
$string2 = 'http://www.google.com';

© Stack Overflow or respective owner

Related posts about php