estoy teniendo el problema que al llamarla me dice que no puede llamar a la
funcion que quiero que aplique al array.
este es el codigo que tengo
function actualizarDb($datos){
$sql = "update estructura_costos set ";
array_walk($datos,'$this->setUpdate'); //EL ERROR ME LO MARCA ACA
// array_walk()
[function.array-walk<http://localhost/initium/function.array-walk>]:
Unable to call $this->setUpdate() - function does not exist in
$sql .= implode(",",array_values($datos));
$sql .= " where id_estructura='$id' ";
echo $sql;
exit();
mysql_query($sql) or die(mysql_error());
}
function setUpdate(&$item, $key){
$item .= $key."=".$item;
}
--
Gerardo Benitez
----------------------------------------------------------------------
mercadoagil.com.ar
webseficientes.com.ar
tips y articulos para desarrolladores web
----------------------------------------------------------------------