I have this 3 insertion to database via function call. This code is working no problem.
//* Set the function parameters.
$client_id = $_SESSION['user']['client_id'];
$params = array(
'name' => 'Abu',
'data' => 'user',
'active' => 'y',
'stamp' => date('Y-m-d H:i:s'),
);
$id = $client->user_add($client_id, $params);
$params = array(
'name' => 'Ali',
'data' => 'user',
'active' => 'y',
'stamp' => date('Y-m-d H:i:s'),
);
$id = $client->user_add($client_id, $params);
$params = array(
'name' => 'Siti',
'data' => 'user',
'active' => 'y',
'stamp' => date('Y-m-d H:i:s'),
);
$id = $client->user_add($client_id, $params);
The difference is only in name. Is there anyway I could make only one function call to insert data? With loop or something? Thanks in advance.