0
I would like to put in an api my custom field example:
"name" => "teste",
"name" => "<?php echo get_post_meta( $post->ID, 'nome', true ); ?>",
below follows the complete code:
<?php
require('routeros_api.class.php');
$API = new routeros_api();
$API->debug = true;
if ($API->connect('192.168.36.1', 'admin', '987987')) {
$API->comm("/ip/hotspot/user/add", array(
"name" => "teste",
"password" => "123",
));
print_r($ARRAY);
$API->disconnect();
}
?>
Wouldn’t you just put the variable there? No
echo
– Lucas
In the case as it would be without echo
– Hemerson Prestes
"name" => get_post_meta($post->ID, 'nome', true);
– Lucas
Nothing didn’t work out, bro
– Hemerson Prestes