Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8091703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:07:27+00:00 2026-06-05T20:07:27+00:00

I have been recommended to put a space between foreach and (, among other

  • 0

I have been recommended to put a space between foreach and (, among other things. My understanding is that it helps to differentiate between functions and everything else.

I was just working with an array and noticed that you are supposed to unset($value). I looked up unset and it’s a construct. foreach is also a construct. Then I looked and array is also a construct. No one seems to put a space with unset or array, though.

How do you know when to put a space in and not? I use Adobe Dreamweaver, so I just got into a habit of putting a space after every php word that was colored green (like include_once).

JJ

Edit…

It’s possible that it has something to do with keywords http://php.net/manual/en/reserved.keywords.php. I noticed that foreach is a keyword, but array() is also a keyword.

JJ

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T20:07:28+00:00Added an answer on June 5, 2026 at 8:07 pm

    There’s many different coding conventions for php. The Zend standards seem to be very close to most code I see:
    http://framework.zend.com/manual/en/coding-standard.html

    Anyway, probably a space after control structure keywords

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been reading through this wonderful website regarding the recommended Python IDEs and
Can anyone recommend a Prolog compiler for .Net. The ones that I have been
I have been tasked with refactoring some components that used xmlbeans to now make
When an app have been put into the background and later resumes to an
I have been receiving reports from customers in the field that my app is
We have a large C code base that has been developed over several decades.
When doing concatenating lots of strings, I have been recommended to do it using
I have been reading that Apple recommends to use block-based animations instead of CATransaction
It has been recommended to me that I investigate Key/Value pair data systems to
I'm fairly new to Haskell and have been slowly getting the idea that there's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.