I seem to be having a problem with the code
[code]$stores = array(“2001”, “2002”, “2051”, “2052”, “2053”, “1501”, “1502”, “1503”, “1504”);
$work = ‘2001; 1501’;
$info = explode(’;’, $work);
for ($i = 0; $i < count($stores); $i++) {
// if(in_array($info[$i], $stores, true)) {
if(in_array($info[$i], $stores)) {
echo ‘’. $stores[$i] .’ [ Edit ]
‘;
} else {
echo ‘’. $stores[$i] .’
';
}
}[/code]
Result:
2001 [ Edit ]
2002 [ Edit ]
2051
2052
2053
1501
1502
1503
1504
What I am looking for is when $work is in the $stores array and they == eachother then put and edit link beside the store
and if there is a $stores at which the $work is not there then no edit button
what i would like to happen;
2001 [ Edit ]
2002
2051
2052
2053
1501 [ Edit ]
1502
1503
1504
thanks in advace