Question: i have a list of posts on a page with a search bar at the top of the page. is there a way to get the contents of the search bar when the user hits enter? 

i don't want to submit a form but i want to get the contents of the search bar without leaving the page. i think i'd be able to get the contents of the field using `$("#txt_name").attr('value');` but is there a way I can just get the value when the user hits enter inside the search box?

then depending on what they search i'd be able to check the `<div>` id's and see if they match. if they don't match then fade them out...

Answer: 
Seems i've solved it ...

Short story:  

Recompiled PHP with `--enable-zend-multibyte`.

Long story:  

I tried everything imaginable ... checked source files byte-by-byte and there were no issues to be found. I've tried getting file contents inside php and echoing byte array from insidde php and in this case too, no issues to be found.  

I've tried recompiling php with debugging symbols, but the process finished with 0377 and gdb had nothing useful to offer.

No matter what i did, uppon hitting an include statement (or variants of it) i got the syntax error on line past last of the included file.

I would expect the files having BOM (as suggested by almost everyone i've asked). So i thought it **had to be** something with how php was being run and tried changing environment variables (like LC\_\* vars) but again no results.

So i the end i had an add-configure-option-and-recompile-php session ... not sure exactly why as all of the scripts contain no multibyte chars and as stated before no BOM marker, but after recompiling PHP with `--enable-zend-multibyte`, the code started to work as expected.

**Thanks to all for suggestions.**
If you are using APC probabily you don't have updated the previous byte code.

Try `apc_clear_cache();`