I am optimizing my website a bit. Tested the page on local, everything is fine. When I upload it, and access it live, it sudently throws a parse error... but it working perfectly locally, like I said.
Parse error: syntax error, unexpected '[', expecting ',' or ';' in /home/theriff/www/frvideos.php on line 25
the code is the following one:
echo explode('|',$youtube[$i])[2].'<br />'."\r\n";
$youtube[$i] is a line formated like this:
DFHG-LINKYOUTUBE-HJGHJ|french Description|English Description
The youtube link only is the ID so there's no '|' symbol in it for sure, and it's read from a text file I write myself manually, so I am sure of the entry.
Does anyone know why it's working fine on local (EasyPhp Developper) but not on the distant server?