This question already has an answer here:
It's seems to look like my every thing is ok but i don't know why it's give me a this sort of error: Please Help me
Parse error: syntax error, unexpected '[' in /home/sites/http://ift.tt/21FRIMp on line 330
=============
Parse error: syntax error, unexpected '[' in /home/sites/http://ift.tt/21FRIMp on line 331
Here is my code :
<?php
$exclude = ['diffusion','twice-loved','antique-vintage'];
$tax_slugs = [];
foreach ($tax as $value) {
array_push($tax_slugs, $value->slug);
}
$intersect = count(array_intersect($exclude, $tax_slugs));
//if( $tax[0]->slug != 'diffusion'):
if($intersect === 0):
?>
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire