String Function Question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mattmcb
Forum Commoner
Posts: 27
Joined: Sun Jan 25, 2004 3:34 pm

String Function Question

Post by mattmcb »

Let's say I have a string http://www.website.com and I want to find out if the string contains an http:// or not. If not I want to add it to be displayed in the html code.

Can anyone help with the code for this?
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

preg_match Should work im sure!
Post Reply