...

View Full Version : String Comparison + php



Bhagya
08-25-2006, 08:40 AM
Dear Friends.

How to check two strings are equal ??????

what is the method ???

Casper

chump2877
08-25-2006, 12:04 PM
if ($string1 == $string2)
{
// Do something if the strings are equal...
}

ronverdonk
08-25-2006, 12:24 PM
When you need a strict comparison you must to use


if ($string1 === $string2)

This comparison returns TRUE if $string1 is equal to $string2 AND both strings are of the same type.

Ronald :cool:

marek_mar
08-25-2006, 04:34 PM
I want to see two strings of different type.

lansing
08-25-2006, 04:49 PM
http://us2.php.net/manual/en/language.operators.comparison.php

GJay
08-25-2006, 08:28 PM
I want to see two strings of different type.
I was going to post a link to a picture of some string for you, but the first 3 pages of google results were all g-strings :|

marek_mar
08-25-2006, 09:05 PM
I wouldn't mind.

Fumigator
08-26-2006, 12:04 AM
You had to go and say that and make me go look.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum