I want to create an array like this:
$myArray=array(
array('orange','A very bright color'),
array('blue','A nice color like the ocean'),
array('yellow','Very bright like the sun') ...etc...
)
Sort of like a small database in memory. Then I want to compare each
of the rows coming
Assuming that you are also accepting partial matches... (e.g. if you had
a sentence with something like, Mr. LeBlue says hello, and
that should be a match for blue)
If $mysqlString contains 1 sentence from the mySQL database(I assume
you've a loop or something that'll fetch 1 string per
Hello,
what have you been trying for comparison so far that has not been
working?
if you have php 5, you would want to use stripos, which is case-
INsensitive, not strpos, which is the opposite.
Also, note the warning on the man page. you would want to use a
triple equals sign !===false
sorry, I am mistaken here. I forgot that !== is the same
functionality as a ===, in that the comparison is made by value
*and* type.
On Oct 16, 2005, at 11:26 PM, Jordan Miller wrote:
Also, note the warning on the man page. you would want to use a
triple equals sign !===false because
one more thing... if you have php 5 and = 3.0.6, you could use
stristr for case insensitive comparison without having to deal with
the slower and more cumbersome regex.
On Oct 16, 2005, at 11:18 PM, Minuk Choi wrote:
Assuming that you are also accepting partial matches... (e.g. if
you
5 matches
Mail list logo