<?php
/*
[
{"campanha":"SUPERMECADO1","telefone":"1999999999"},
{"campanha":"SUPERMECADO1", telefone":"1999999991"},
{"campanha":"SUPERMECADO2", telefone":"1999999992"},
{"campanha":"SUPERMECADO2", telefone":"1999999993"}
]
*/
array('campanha' => 'SUPERMERCADO1', 'telefone'=>'1999999999'), array('campanha' => 'SUPERMERCADO1', 'telefone'=>'1999999991'), array('campanha' => 'SUPERMECADO2','telefone'=>'1999999992'), array('campanha' => 'SUPERMECADO2','telefone'=>'1999999993') );
foreach($r as $v)
{
$rows[$v['campanha']]['telefones'][] = $v['telefone'];
}
PD9waHAKCi8qClsKIHsiY2FtcGFuaGEiOiJTVVBFUk1FQ0FETzEiLCJ0ZWxlZm9uZSI6IjE5OTk5OTk5OTkifSwKIHsiY2FtcGFuaGEiOiJTVVBFUk1FQ0FETzEiLCB0ZWxlZm9uZSI6IjE5OTk5OTk5OTEifSwKIHsiY2FtcGFuaGEiOiJTVVBFUk1FQ0FETzIiLCB0ZWxlZm9uZSI6IjE5OTk5OTk5OTIifSwKIHsiY2FtcGFuaGEiOiJTVVBFUk1FQ0FETzIiLCB0ZWxlZm9uZSI6IjE5OTk5OTk5OTMifQpdCiovCgokciA9IGFycmF5KAoJCWFycmF5KCdjYW1wYW5oYScgPT4gJ1NVUEVSTUVSQ0FETzEnLCAndGVsZWZvbmUnPT4nMTk5OTk5OTk5OScpLAoJCWFycmF5KCdjYW1wYW5oYScgPT4gJ1NVUEVSTUVSQ0FETzEnLCAndGVsZWZvbmUnPT4nMTk5OTk5OTk5MScpLAoJCWFycmF5KCdjYW1wYW5oYScgPT4gJ1NVUEVSTUVDQURPMicsJ3RlbGVmb25lJz0+JzE5OTk5OTk5OTInKSwKCQlhcnJheSgnY2FtcGFuaGEnID0+ICdTVVBFUk1FQ0FETzInLCd0ZWxlZm9uZSc9PicxOTk5OTk5OTkzJykKCSk7CgkKJHJvd3MgPSBhcnJheSgpOwpmb3JlYWNoKCRyIGFzICR2KQp7Cgkkcm93c1skdlsnY2FtcGFuaGEnXV1bJ3RlbGVmb25lcyddW10gPSAkdlsndGVsZWZvbmUnXTsKfQoKZWNobyBqc29uX2VuY29kZSgkcm93cyk7