Skip to content

Explain the PHP ternary operator #1

Open
@yurm04

Description

@yurm04

Description

Do some research into what a ternary operator is. Write up a short explanation of what it is, when it can be used, and why it is useful. Include at least 3 examples of using the ternary operator.

Requirements

In the repo samples folder, create a new folder called ternary-operator. In the new directory, create an index.php file. Using HTML, write up your explanation of what a ternary operator is, and include sample code. Using PHP, actually use the ternary operator in the examples to demonstrate that they work. Make sure to include plenty of comments to explain what is going on. Cite all sources.

When viewing the index.php page, should see properly formatted HTML, and working PHP code. Feel free to style the page if desired.

Checklist

  • Title is short, sweet, to the point.
    Issue is descriptive enough for anyone to come across it and know exactly what is being presented.
    The correct labels have been added.
    The expected behavior is described (if applicable).
    Steps to reproduce the problem have been included (if applicable).
    Screenshots were included (if applicable).

Mentions

@yurm04

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @yurm04

      Issue actions

        Explain the PHP ternary operator · Issue #1 · yurm04/CISC2350