mrkeck Sharing the Love


Make buttons act like buttons

By default, buttons are submits, so this should make them act actually like buttons

Filed under: HTML, jquery No Comments

json_decode not working from database query

Short answer:


Had some JSON in a database that I wanted to use in my PHP code, but it keep coming up NULL.
Did a var_dump and the number of characters didn't match. Tried all sorts of trims and tried converting to utf8.
Ended up calling html_entity_decode() on the JSON string, then json_decode worked perfectly!

Filed under: PHP No Comments