php,html,sql-server,input-filtering
I couldn't fix your present code (as much as I tried), but am submitting the following suggestive method, using str_replace(): $string = $_POST['name']; $words = array('se x', 'SEX', 's e x'); $replacements = array('censored 1', 'censored 2', 'censored 3'); $result = str_replace($words, $replacements, $string); echo $result; Edit: $input = 'sE...
javascript,jquery,html,checkbox,input-filtering
Simplest approach - separate the two categories, and only check when necessary... $(document).ready(function () { $("input[type=checkbox]").change(function () { var divId = $(this).attr("id"), color = ['red', 'green', 'blue', 'purple'], price = ['cheap', 'expensive'], cat = $.inArray(divId, price) == -1 ? price : color; if (!$(this).is(":checked")) { $('div.' + divId).hide() } else...
excel,excel-formula,match,worksheet-function,input-filtering
With data like: In D1 enter: =IF(ISERROR(MATCH(A1,B:B,0)),1,"") and copy down and then in C1 enter: =IFERROR(INDEX(A:A,MATCH(ROW(),D:D,0)),"") and copy down. This results in: ...