$.inArray issues with passing string from php script

sinist3r

New Member
I'm having a problem with the inArray function not sure why. I'm passing a string back to the Javascript from my PHP it looks something like this 22,24 ect. I've tried using the split command to convert it to a Javascript array and I've tried it just as is. Either way the inArray function isn't finding 22, I've tried 22 with and without speak marks in the inArray function. \[code\]$.ajax({ url: "<?=base_url(); ?>/products/update_dropdown/"+<?=$product['product_id']?>+"/"+strUser, type: 'GET', success: function(msg) { var test; test = $.inArray(22, msg); alert(test); } });\[/code\]Thank you for any help this is really driving me nuts!
 
Top