There is an array with elements that outputs everything. How to make an array first display elements with a value of 1 and then 0?

    1 answer 1

    Use rsort .

    Example:

    $digits = array(1, 0, 0, 1); rsort($digits);