Hi All, I want to make algorithm representation of my code for my homework, but I have no idea to convert PHP code to algorithm. Can anyone help me?
Code: --- begin code --- function doAdd($command, $options, $params) { $kategori = new Silaris_Kategori($params); $res = $kategori->saveKategori(); if (Silaris::isError($res)) return $res; if (!empty($kategori->errors)) { $messages = array(); foreach ($kategori->errors as $field => $msg) { $messages[$field] = '['. ucfirst($msg) . ']'; } $dlgdata = $this->_getDialogData($kategori, $messages); if (Silaris::isError($dlgdata)) return $dlgdata; $this->ui->outputData($dlgdata, 'kat-showadd'); return false; } return true; } --- end code ---- Algorithm: ?????? Thanks for your response. Regards, Firman