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.

rotorhead

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    rotorhead reacted to Jay Gilford in Basic PHP tidy-up please   
    Since it's only one line, you don't need the braces. I do actually use them for one line statements, but you asked for it to be cleaned up. The following are the same

    if(...) { // Do something here} if(...) // Do something here
     
    When you want to do more than one thing based on a condition, you put them in curly braces

    if(...) { // Do something here // Do something else here // Do something else here too }
     
    As for the single/double quotes, I generally don't use double quotes unless necessary such as writing SQL queries where you need single quotes in them. There's no real right or wrong answer for them, but single quotes used to be parsed quicker since you can have variables in double quoted strings (I don't recommend this personally, but many people are happy to do it) so it takes extra processing power to find those variables, and convert them. That said, I've heard that in the latest versions of php these differences are almost unnoticable

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.