December 4, 201114 yr Hello, i have this error but dont see whats wrong so any ideas? Fatal error: [] operator not supported for strings in /var/www/vhosts/....../httpdocs/nonindexed/index.php on line 66 Line 66: $outcome[$no][] = $outcome[$i[$no]]." ".$genetic[$no-2]; i think it may have something to do with the first $outcome having 2 [][] and the outcome after equals has [] prehaps script works fine other than that though Thanks in advance, Gary
December 5, 201114 yr Hello, i have this error but dont see whats wrong so any ideas? Fatal error: [] operator not supported for strings in /var/www/vhosts/....../httpdocs/nonindexed/index.php on line 66 Line 66: $outcome[$no][] = $outcome[$i[$no]]." ".$genetic[$no-2]; i think it may have something to do with the first $outcome having 2 [][] and the outcome after equals has [] prehaps script works fine other than that though Thanks in advance, Gary hmm not sure if $outcome[$i[$no]] is allowed (it might be though). I would try assigning $i[$no] to a variable like: $myVar = $i[$no]; $outcome[$no][] = $outcome[$myVar]." ".$genetic[$no-2]; if this doesn't work it may be a problem caused by the value contained in the variable.
December 5, 201114 yr What does the rest of the code look like around that? Is it in a for loop or something?
December 5, 201114 yr Hello, i have this error but dont see whats wrong so any ideas? Fatal error: [] operator not supported for strings in /var/www/vhosts/....../httpdocs/nonindexed/index.php on line 66 Line 66: $outcome[$no][] = $outcome[$i[$no]]." ".$genetic[$no-2]; i think it may have something to do with the first $outcome having 2 [][] and the outcome after equals has [] prehaps script works fine other than that though Thanks in advance, Gary Is $outcome an array? Try putting $outcome = array(); somewhere before the code that assigns to it and see what happens. edit: Or the same for $genetic too. Edited December 5, 201114 yr by henbast
December 5, 201114 yr Author Is $outcome an array? Try putting $outcome = array(); somewhere before the code that assigns to it and see what happens. edit: Or the same for $genetic too. i worked it out now after trying it, it appeared it wouldnt let me change a number in a function, number 8 would work but 6 wouldnt :s (that was for the variable called $no)
Create an account or sign in to comment