My bash script call a php file
#!/bin/bash
data=$(./getconfig.php)
The file getconfig.php is:
#!/usr/bin/env php
<?php
$array = array();
...
How can I return the $array from the php file in order to manipulate this array in the bash script?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As per documentation, an array is initialized with the following syntax:
So all you need to do is implode your
$array: