You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before shuffle: Array ( [0] => A [1] => B [2] => C [3] => D [4] => E ) 1
After shuffle: Array ( [0] => A [1] => B [2] => C [3] => D [4] => E ) 1
Before adnShuffle: Array ( [0] => A [1] => B [2] => C [3] => D [4] => E ) 1
After adnShuffle: Array ( [0] => B [1] => D [2] => E [3] => C [4] => A ) 1
It seems that the $tab variable is not modified after calling the php function shuffle
If I do a custom modifier, it works
function smarty_modifier_adnShuffle($iTab)
{
shuffle($iTab);
$new = array();
foreach($iTab as $e) {
$new[] = $e;
}
return $new;
}
Maybe because the shuffle parameter is a reference pointer?
The text was updated successfully, but these errors were encountered:
Hello,
Hereafter my sample
My result with smarty v5
It seems that the $tab variable is not modified after calling the php function shuffle
If I do a custom modifier, it works
Maybe because the shuffle parameter is a reference pointer?
The text was updated successfully, but these errors were encountered: