Bright_4 0 Newbie Poster

HI, CAN I GET SOME HELP RE-WRITING THE BELOW. CODE 2 REFERENCES CODE 1 USING $sendData VARIABLE. I WOULD LIKE TO REMOVE CODE 1 COMPLETELY. CAN I GET HELP WRITING CODE 1 INTO CODE 2, PERHAPS IN FORM OF ARRAY?

CODE 1

$sendData = '{ "messages" : [ { "content" :  "$my_order", "destination" : "0718860000" } ] }';

CODE 2

$options = array(
    'http' => array(
        'header'  => array("Content-Type: application/json", $authHeader),
        'method'  => 'POST',
        'content' => $sendData,
    )
);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.