Skip to content
Advertisement

JSON_ENCODE can’t encode large array

I need help with encoding large array into JSON using PHP’s json_encode(). The array is from a local Database. I am using JS to parse JSON. However, the PHP script that handles array to JSON format stops if the dataset is too big. (i.e 100,000 Results). I tried to up my memory_limit to -1 and still does not help. Is

same results for php if inside foreach

My problem is that as soon as my php variable was used for the first time, the same value shows up in every loop, though it is uncorrect: As soon as I have a correct result for $goals_match > 4 the 1 shows up correctly. But in my next results no matter if wrong or right, the 1 appears again

PHP/SQL Dynamic menu depending on different tables

I’m trying to manage a dynamic menu based on results from tables in my database. Code below is so far i have come.. But i can’t get it to display as i want to. i have 3 tables in my database looking like this. ws_categories id maincat (name of main-category) ws_subcategories id subcat (Name of sub-category) parentcat (id of main-category)

Executing bash script with PHP, and input commands

I`m trying to execute a bash script using PHP, but the problem is that the script needs to have some commands and informations inputed during the execution process. This is what I`m using The script execute OK, but I`m not able to input any option on the script. Answer shell_exec() and exec() are not able to run interactive scripts. For

Advertisement