RE: [PHP] populate form input option dropdown box from existing data

[email protected] ("Ford, Mike")
Newsgroups php.general
Message-ID <93ED589E60BA254F97435FE6C97F2C6702B925BD@leedsmet-exch1.leedsmet.ac.uk>
On 17 June 2009 14:30, PJ advised:


> For the moment, I am trying to resolve the problem of
> extracting a value
> from a string returned by a query. I thought that in_array() would do
> it, but the tests I have run on it are 100% negative. The only thing I
> have not used in the tests is third parameter bool $strict which only
> affects case-sensitivity if the $needle is a string.

$strict has nothing whatsoever at all in any way to do with case
sensitivity -- $strict controls whether the values are compared using
equality (==) or identity (===) tests. As is stated quite clearly on the
manual page, in_array() is always case-sensitive. 

>  This leads me to
> believe that in_array() is either inappropriately defined in
> the manual
> and not effective on associative arrays

Complete rubbish -- the in_array() manual page is excellent and totally
accurate, complete with 3 working examples.

Cheers!

Mike

 --
Mike Ford,  Electronic Information Developer,
C507, Leeds Metropolitan University, Civic Quarter Campus, 
Woodhouse Lane, LEEDS,  LS1 3HE,  United Kingdom
Email: [email protected]
Tel: +44 113 812 4730


To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.