I would suggest referring to Tutorial: Build a PHP and MySQL app in Azure App Service, specifically, database.php. This example illustrates how you can configure database connections in your PHP app. The tutorial illustrates how to create your managed database instance and configure the app settings to use those database properties so that your app can establish a connection.
You can also review the deploy.sh which literally runs a customized deployment script for your application by the platform. Here, you can establish those npm commands and package installs you may need to do. I should also note, for PHP, you really want to be running your app service on a Linux app service plan.