Jump to content


Photo

LIKE


  • Please log in to reply
2 replies to this topic

#1 mcmuney

mcmuney
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 24 March 2006 - 01:58 AM

Can someone validate the code below, I basically want to use... if something starts with http%:

if($reset3[0][sm_bg_contactbox] LIKE 'http%')

#2 wickning1

wickning1
  • Members
  • PipPipPip
  • Advanced Member
  • 405 posts

Posted 24 March 2006 - 03:53 AM

LIKE is an SQL operator, you can't use it in PHP. This would work in PHP:

if (substr($reset3[0][sm_bg_contactbox], 0, 4) == 'http')

#3 mcmuney

mcmuney
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 24 March 2006 - 08:00 AM

That didn't work, is that correct?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users