RE: populate form input option dropdown box from existing data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: m.ford@xxxxxxxxxxxxxx
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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux