Jump to content
alexarpad2003

php / mysql - raw

Recommended Posts

Posted

Am urmatorul cod :

Romana : ".$row['note_romana']."

Matematica : ".$row['note_matematica']."

Istorie : ".$row['note_istorie']."

Engleza : ".$row['note_engleza']."

Unde raw imi ia valorile din baza de date.

Intrebarea mea este cum pot ca de exemplu daca la note_matematica si la

note_engleza este gol in baza de date sa-mi dispara randul cu matematica si engleza, deci rezultatul sa fie :

Romana : 1,2,3

Istorie : 4,6,9

Posted

function s($t,$v) {

if ($v!="")

return $t.':'.$v;

}

echo s('Romana' $row['note_romana']);

echo s('Matematica',$row['note_matematica']);

echo s('Istorie',$row['note_istorie']);

echo s('Engleza',$row['note_engleza']);

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...