Jump to content
MakeWebGames

Crimes Help Please


Nutta

Recommended Posts

i can tell you whats happening but wont be able to help you fix it unless i see the file

either the variable given to foreach is not an array

or

the syntax is wrong

correct format for foreach

foreach($variable as $k => $v)
{

}

or

foreach($variable as $v)
{

}

 

$variable must be an array

$k and $v can be any variable preferably an empty one since it will be over written when the foreach statement executes

just know the index/key will be put assign to whatever variable that is in the $k spot and the value will be assigned to the variable in the $v spot

Link to comment
Share on other sites

i can tell you whats happening but wont be able to help you fix it unless i see the file

either the variable given to foreach is not an array

or

the syntax is wrong

correct format for foreach

foreach($variable as $k => $v)
{

}

or

foreach($variable as $v)
{

}

 

$variable must be an array

$k and $v can be any variable preferably an empty one since it will be over written when the foreach statement executes

just know the index/key will be put assign to whatever variable that is in the $k spot and the value will be assigned to the variable in the $v spot

All wrong, its a very simple fix, he doesnt have crimes, its nothing to do with the code.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...