Please check the stackoverflow link i provided. I detailly mentioned everything with the code , image, links etc.
In my local environment ( WampServer) everything working as expected. My problem is when I upload my website to the live environment (000WebHost - free plan) the CodeIgniter function is not properly working.
Nothing wrong with the code or PHP version compatibility issues. (Currently my local server and live server are using same PHP version PHP version 7.3) .
I think 000webhost has the problem. Heavily doubt that Do 000WebHost have any function execution barriers / DB query issues / bandwidth limitation per request on 000WebHost - free plan ???