Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

need some php help

Featured Replies

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

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.

What does the rest of the code look like around that? Is it in a for loop or something?

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 by henbast

  • 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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.