Jump to content

alexarpad2003

Active Members
  • Posts

    246
  • Joined

  • Last visited

  • Days Won

    1

alexarpad2003 last won the day on July 4 2011

alexarpad2003 had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

alexarpad2003's Achievements

Newbie

Newbie (1/14)

23

Reputation

  1. nununu atunci de ce iti irosesti timpul stand aici ? Dute pe mirc ca e misto acolo.
  2. Merci .
  3. Poate m-am exprimat gresit, sunt si obosit. Asa ca dau un exemplu mai concret. <?php $b=('4 3 4'); $c=explode(' ',$; $a=array_sum($c) / count($c); echo $a; ?> Imi afiseaza 4.6667 Dar daca am asa <?php $b=('4 3 4 -'); $c=explode(' ',$; $a=array_sum($c) / count($c); echo $a; ?> Imi afiseaza 2.75 pentru ca imi vede 4 valori si se imparte la 4, iar eu nu vreau asta. Vreau sa pun o conditie pentru a nu-mi numerota valorea '-' daca mi-o gaseste in array. Deci sa imparta tot la 3.
  4. <?php $b=('4 3 4'); $c=explode(' ',$; $a=array_sum($c) / count($c); echo $a; ?> Cum pot scrie ca de exemplu daca dupa explode se gaseste caracterul '-' in array sa nu mi-l numeroteze functia count.
  5. <!-- ************************************************************************************************ The source code you are trying to view is not avaliable. Please try again later. ************************************************************************************************ .... Hai ma! Serios ?
  6. Mi-am futut ziua uitandu-ma la clipul asta. Nu prea ai cum sa comentezi chestile astea, insa iti pun niste intrebari tulburatoare. Daca pic pe jos ... oare ma ridica cineva ?
  7. Avem exemplul asta : <?php $produs = array ( "laptop" => "1200 ron", "samsung" => "1000 ron", "lapte" => "5 lei" ); echo "<table border='1'>"; foreach ($produs as $nume => $pret) { echo "<tr>"; echo "<td>"; echo $nume; echo "</td>"; echo "<td>"; echo $pret; echo "</td>"; echo "</tr>"; } echo "</table>"; ?> Cum as putea scrie un array de genul "laptop" => "1200 ron" => "da". Iar foreach-ul sa fie ($produs as $nume => $pret=>$stoc), bineinteles sa adaug si echo "<td>"; echo $stoc; echo "</td>"; echo "</tr>"; Stiu ca nu exista asa ceva, sunt prea obosit si am explicat cum am putut. Deci ce alternative pot gasi la problema mea ?
  8. alexarpad2003

    Rst chat

    yceman nu e doar la offtopic. Ma rog.
  9. alexarpad2003

    Rst chat

    Cate topicuri sunt zilnic in care sa nu va bagati pula in gura unu la altul ?
  10. $get_user=mysql_query('SELECT * FROM database WHERE username="'.$_SESSION["s_username"].'" AND password="'.$_SESSION["s_password"].'" '); if(mysql_num_rows($get_user) > 0) { $row_user = mysql_fetch_array($get_user); ......... <table cellspacing="0" cellpadding="0"> <tr> <td width="30" align="center"></td> <td width="160" align="center">Limba romana</td> <td width="440" align="center">'.$row_user['sem1_romana'].'</td> <td width="90" class="media">'.$medie_romana.'</td> </tr> <tr> <td width="30" align="center"></td> <td width="160" align="center">Matematica</td> <td width="440" align="center">'.$row_user['sem1_matematica'].'</td> <td width="90" class="media">11111</td> </tr> <tr> <td width="30" align="center"></td> <td width="160" align="center">Informatica</td> <td width="440" align="center">'.$row_user['sem1_informatica'].'</td> <td width="90" class="media">11111</td> </tr> .......... Stiu ca trebuie pusa o conditie(if), dar nu stiu cum sa o scriu. Deci daca '.$row_user['sem1_matematica'].' nu rezulta nimic, vreau ca randul <tr> <td width="30" align="center"></td> <td width="160" align="center">Matematica</td> <td width="440" align="center"> '.$row_user['sem1_matematica'].'</td> <td width="90" class="media">11111</td> </tr> sa nu mi-l afiseze. LE : Nimeni nimic ? O idee macar, nu vreau mura in gura.
  11. Mai revin cu o intrebare : Am in db campuri care incep cu sem1_ , cum fac sa-mi afiseze doar aceste campuri dar cu conditia ca ele sa fie completate, dar sa-mi anuleze si textul care il scriu in html daca campurile sem1_ din db sunt goale. Exemplu : Limba romana : $row_user['sem1_romana'] Matematica : $row_user['sem1_matematica'] Informatica : $row_user['sem1_informatica'] Afisare html: Limba romana : 10(10.02.2011), 4(12.03.2011), 5(10.02.2011) Matematica : Informatica : 10(10.02.2011), 4(12.03.2011), 5(10.02.2011) Deci vreau matematica sa nu-mi mai afiseze. Limba romana : 10(10.02.2011), 4(12.03.2011), 5(10.02.2011) Informatica : 10(10.02.2011), 4(12.03.2011), 5(10.02.2011)
  12. Merci mult +rep
  13. Am urmatorul cod : <?php $note="10(10.02.2011), 4(12.03.2011), 5(10.02.2011)"; $note1=explode(",",$note); $count=count($note1); echo "numar note : ".$count; ?> Cum as putea sa ii dau explode la $note altfel incat sa-mi returneze doar notele(10, 4, 5) ca apoi sa pot face media (10+4+5):3 ?
  14. Cand pierzi ... bine spus
×
×
  • Create New...