I made a website that works perfectly locally. Now I'm trying to publish it online with ploi.io . I get this error:
"Call to undefined function array_key_last()" 3rd line in code
but array_key_last() is a PHP-function.
https://www.php.net/manual/en/function.array-key-last.php
Here is my website link: http://rocallisa.xyz/
if($key === array_key_last($photos))
My server is running PHP 7.3 but this doesn't help.
What is the PHP version in the online publication?
In PHP docs:
array_key_last (PHP 7 >= 7.3.0)
https://www.php.net/manual/es/function.array-key-last.php
Is the version of your remote server latter than 7.3?
An alternative: How to get last key in an array?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With