hi all I need is to encode a string that is in json format
in python is something like this:
def queue(self, url, api_user, api_pass, api_version):
args = urllib.urlencode({'cmd': 'api_queue_sms', 'username': api_user, 'password': api_pass, 'content': self.contenido, 'destination': self.destino, 'api_version': api_version})
but I need to pass it to php what is done is this:
function queue($url, $api_user, $api_pass, $api_version){
$args = urlencode('cmd': 'api_queue_sms', 'username': $api_user, 'password': $api_pass, 'content': $this->contenido, 'destination': $this->destino, 'api_version': $api_version);
but he does not recognize me ":" I guess I need something to tell him it's json
I hope your help thanks