milerfreitas
Member
Hello everybody! I'm trying to create a macro where I would need to work with arrays.
In PHP (just for example) I can do it like this:
I would like to do something similar in macrodroid.
My actions: Set 'name' variable -> User Prompt Set variable 'phone' -> User Prompt Populate the 'contacts_data' array with the value of these variables.
Iterate through the 'contacts_data' array and display all values formatted as follows: Name: Maxmiler, Phone: 21 91234-5678
Is there any way to do this in macrodroid?
Can you help me?
Thank you very much in advance.
In PHP (just for example) I can do it like this:
Code:
<?php
$contacts = array('name' => ['Maxmiler', 'Freitas'], 'phone' => ['21 91234-5678', '21 94321-8765']);
print $contacts['name'][0]; // this would return me the value 'Maxmiler'
?>
I would like to do something similar in macrodroid.
My actions: Set 'name' variable -> User Prompt Set variable 'phone' -> User Prompt Populate the 'contacts_data' array with the value of these variables.
Iterate through the 'contacts_data' array and display all values formatted as follows: Name: Maxmiler, Phone: 21 91234-5678
Is there any way to do this in macrodroid?
Can you help me?
Thank you very much in advance.