Jump to content

Drawing HTML Table With MySQL Data


JDevOnline

Recommended Posts

Hi Barand,

 

PHP version on my local server is 5.6 whereas on the online server it is 5.4, this might be the reason that the script has thrown the following error on then taken online:

 

PHP Local: 5.6
PHP Online: 5.4

"Parse error: syntax error, unexpected '[' in /home/content/87/html/nroll-classwise.php on line 37"

 

When I inspected the code on the line number mentioned above it is:

$data = [];

Please tell me how to handle this situation, thank you.

Edited by JDevOnline
Link to comment
Share on other sites

Let me be more clear: PHP 5.4 was entirely abandoned and is full of security vulnerabilities that will never be fixed. Unless you have a special LTS operating system which provides its own PHP updates, you cannot use PHP 5.4. No amount of code will fix that.

 

What kind of hoster and system is this?

Link to comment
Share on other sites

Let me be more clear: PHP 5.4 was entirely abandoned and is full of security vulnerabilities that will never be fixed. Unless you have a special LTS operating system which provides its own PHP updates, you cannot use PHP 5.4. No amount of code will fix that.

 

What kind of hoster and system is this?

Thanks for the info, I will either upgrade if possible or change my web hosting company, to be able to use the latest version of php, thanks.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.