Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

Install AMPPS in Windows

What is AMPPS?

AMPPS is a bloat-free local development stack with PHP, MySQL, Apache and Softaculous.AMPPS supports all the latest versions of PHP, Apache and MySQL. Installing and updating these packages is just one click. AMPPS also supports multiple PHP versions and you can switch between PHP versions with a click. Softaculous auto installer is also included with AMPPS which enables you to install 400+ apps like WordPress, Joomla, Drupal, Magento, phpBB, etc which can be installed and updated with just one click.

Download the latest version of AMPPS from here.

AMPPS Installation Guide:

1. Double click the on the AMPPS installation executable (e.g.AMPPS-4.1-x86_64.exe) to start the installation process

ampps setup.

2. Select I accept the agreement and click Next

ampps license aggrement.

3. Select the path where you would like to install AMPPS (e.g. C:\Program Files\Ampps)

ampps destination location.

4. Select if you would like AMPPS to add a desktop shortcut, quicklaunch icon or startmenu icon

ampps additional tasks.

5. Click the Install button to install AMPPS on your computer

ampps ready to install.

6. Please wait while AMPPS installation progresses. It should not take much time

ampps installing.

7. Installation completed. Select Launch AMPPS checkbox and click Finish button

ampps completing setup wizard.

8. AMPPS will now download PHP, Apache, MySQL and Softaculous packages. Click Continue button. It might take few minutes based on your internet connection.

ampps install apps.

9. AMPPS is now installed and you can see Apache and MySQL services are up and running. You can click the On/Off buttons to start and stop services.

ampps view running services.

10. In order to install more PHP and update apps you can go to the Applications Manager.

ampps applications manager.

11. Testing PHP. We created a test php file with the following contents in the www/ folder of AMPPS path e.g. (C:\Program Files\Ampps\www\info.php)
<?phpphpinfo(); ?>

ampps php version 7.4.28.

12. You can enable/disable PHP extensions and edit configuration files for PHP, MySQL, Apache from the AMPPS control center.

Previous: Install WAMP in Windows 7
Next: Basic of PHP



PHP: Tips of the Day

How to Sort Multi-dimensional Array by Value?

Try a usort, If you are still on PHP 5.2 or earlier, you'll have to define a sorting function first:

Example:

function sortByOrder($a, $b) {
    return $a['order'] - $b['order'];
}

usort($myArray, 'sortByOrder');

Starting in PHP 5.3, you can use an anonymous function:

usort($myArray, function($a, $b) {
    return $a['order'] - $b['order'];
});

And finally with PHP 7 you can use the spaceship operator:

usort($myArray, function($a, $b) {
    return $a['order'] <=> $b['order'];
});

To extend this to multi-dimensional sorting, reference the second/third sorting elements if the first is zero - best explained below. You can also use this for sorting on sub-elements.

usort($myArray, function($a, $b) {
    $retval = $a['order'] <=> $b['order'];
    if ($retval == 0) {
        $retval = $a['suborder'] <=> $b['suborder'];
        if ($retval == 0) {
            $retval = $a['details']['subsuborder'] <=> $b['details']['subsuborder'];
        }
    }
    return $retval;
});

If you need to retain key associations, use uasort() - see comparison of array sorting functions in the manual

Ref : https://bit.ly/3i77vCC