Tagged Questions
4
votes
4answers
178 views
PHP in_array() always returning false
PHP is always returning false when I use in_array(), and whether it is or isn't in the array doesn't matter. For example:
$list = 'test
list
example';
$list_arr = array();
$list_arr = ...
3
votes
2answers
161 views
inArray jQuery from php array, finding the item index
This code, which I've found somewhere online, works fine and it's kind of what I'm trying to accomplish:
$(document).ready(function(){
var arrData = [ "j", "Q", "u", "e","r","y" ];
...
1
vote
1answer
171 views
PHP in_array returns false positive
I'm checking whether a checkbox should be checked against a user preferences array of id's with:
if(in_array($category['id'], $checkedarray)){
$checked = "checked='checked'";
}
the result of ...
0
votes
3answers
172 views
MySQL Select list In Array
Each Article can have unlimited categories.
Categories are saved in the database like this
example article_category: '1','3','8'
OR
example article_category: '2','3'
So when I search for a ...