in_array() problem
From: Craig Keightley (craig_at_sitedesign.net)
Date: 03/30/04
- Next message: Jon Kraft: "Re: in_array() problem"
- Previous message: jf1288: "reading zip files in php"
- Next in thread: Jon Kraft: "Re: in_array() problem"
- Reply: Jon Kraft: "Re: in_array() problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Mar 2004 16:11:50 +0100
I am trying to compare values of a string entered into an array but having
no results, is this possible to achieve:
<?php
$ids = $row_rsProduct['itemList']; // A comma separated list of values
(1,2,3,4,5,6,7,8)
$list = array($ids);
if (in_array(1, $list)) {
echo "In List";
}
?>
I have no results but i cannot see why
Any help would be grateful
Craig
- Next message: Jon Kraft: "Re: in_array() problem"
- Previous message: jf1288: "reading zip files in php"
- Next in thread: Jon Kraft: "Re: in_array() problem"
- Reply: Jon Kraft: "Re: in_array() problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|