Attention : 1

When you show data in php and encode that data make sure that during execution put comment otherwise you will get error like integer or string can not converted in JSON object like in virtual school app during attendance you wrote echo statement at every where so error show like that but when you comment those line it will work perfectly.