php - Display Array that included on Array -
i need help.
i have array structure this.
$data = array( 'id_packet' => null, 'name_packet' => null, 'number_of_users' => null, 'number_of_blogs' => null, 'number_of_accounts' => null, 'price' => null, 'period' => null, 'status' => 1, );
where 'number_of_users' => null, 'number_of_blogs' => null, 'number_of_accounts' => null,
results of following search in database:
$n=1; foreach ($list_component $dt) { $comp[$n] = $dt->name_comp; echo "'".$comp[$n]."' => null,"; $n++; }
and has displayed expected results.
i want ask, how include 'number_of_users' => null, 'number_of_blogs' => null, 'number_of_accounts' => null,
in $data array above?
i've been looking reference, have not managed find any. perhaps 1 of can or have idea? thanks.
framework: phalcon
you can this
$data = array( 'id_packet' => null, 'price' => null, 'period' => null, 'status' => 1, ); $n=1; foreach ($list_component $dt) { $comp[$n] = $dt->name_comp; $data[$comp[$n]]= null; $n++; }
Comments
Post a Comment