hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : PHP comparing variable contents
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

PHP comparing variable contents

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 01-25-2006, 09:44 AM
netfreak netfreak is offline
Web Hosting Master
 
Join Date: Nov 2005
Location: BC, Canada
Posts: 729

PHP comparing variable contents


Couldn't seem to find anything on google related to this... If I have a numerical value in lets say $first and I'd like to see if $second (which is the contents of a field pulled from a SQL table) contains the value of $first. For example, if $first = 3363 and $second = 169133639126, I'd like to see if $second contains the value of $first.

__________________
|| Higher Intellect || Half a million documents and climbing.

Reply With Quote


Sponsored Links
  #2  
Old 01-25-2006, 11:51 AM
X-TechMedia X-TechMedia is offline
Junior Guru
 
Join Date: Nov 2002
Location: United Kingdom
Posts: 247
PHP Code:
if (strpos($second$first) !== FALSE) {
print 
'Found';


__________________
Ben Periton

Reply With Quote
  #3  
Old 01-25-2006, 02:23 PM
netfreak netfreak is offline
Web Hosting Master
 
Join Date: Nov 2005
Location: BC, Canada
Posts: 729
Excellent. thanks

__________________
|| Higher Intellect || Half a million documents and climbing.

Reply With Quote
Sponsored Links
Reply

Related posts from TheWhir.com
Title Type Date Posted
Strategies to Reduce Operating Costs, Avoid Email Blacklisting and Improve Deliverability Webinars 2013-05-15 11:27:46
WHD.india 2013 Web Hosting Events 2013-04-24 18:18:58
Cloud Infrastructure Software VMware Applies for OpenStack Gold Membership Web Hosting News 2012-08-27 11:09:49
The Variable Requirements of Data Center Vendor Selection: Andrew Schaap of Digital Realty Trust Web Hosting News 2011-09-27 15:06:29
Web Host JaguarPC Adds Auto-Installer Softaculous to Hosting Plans Web Hosting News 2011-07-27 18:55:46


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?