I was wondering if someone can help me implement the Twilio PHP API. I installed the library using composer and changed everything it said to in the documentation.
However, When I try to run the application I just get a blank page. After doing some commenting, it looks like the issue is with the arrays. When I comment out the arrays it will at least give me an error and there will be something when I check the source code.
Below is the code that I'm using. Any help is greatly appreciated.
<?php
require "vendor/autoload.php";
use Twilio\Rest\Client;
$AccountSid = "MySid";
$AuthToken = "MyToken";
$client = new Client($AccountSid, $AuthToken);
$people = array(
"Number 1" => "Carlos",
"Number 2" => "Jon",
"Number 3" => "Madison"
);
foreach ($people as $number => $name) {
$sms = $client->account->messages->create(
$number
array(
'from' => 'My Number',
'body' => " This is a test"
)
);
echo "Sent message to $name";
} ?>