Browsed by
Tag: php

[XenForo] – How to create an input box with autocomplete for username. ?>

[XenForo] – How to create an input box with autocomplete for username.

I starting use XenForo (XF) for several years to build some website. Basically XF base on Zend framework but not stop from that, XF also bring so many great feature for developers. I’ll write all of those features later, but now I want to show you one of the really great thing in XF template. I’m creating a from which allow admin to input the user name and it must show some suggestion (auto complete). The purpose is it will…

Read More Read More

[PHP] – json_decode() for big integers ?>

[PHP] – json_decode() for big integers

json_decode() is use for decode a json text to object (or array) in PHP. For normal case, below code will decode a json string to an array in PHP:

But if the json contain a really big integers then the problem will be appear, take a look at below code:

The result will be:

So the solution here is we need to tell the┬ájson_decode function that we need to convert the big integers to string. Something like…

Read More Read More