Jump to content

Recommended Posts

Posted

Am gasit codul pentru fontawesome la iconite.. Dar am nevoie de un if... Gen pun acolo {$icon}, dar imi trebuie un if in html.... Cum pot face daca forum id este 11, atunci {$icon} = <i class="fa-fa-comments"></i>, elseif forum id e 12 atunci {$icon} = bla bla else {$icon} = ceva ???  help me please

  • Moderators
Posted

Un if un HTML nu exista, poate in PHP.

if (11 == $forum_data['id']) {
    Ce sa faca..
} elseif (12 == $forum_data['id']) {
    Ce sa faca..
}

If-urile is in modu Yoda: https://en.wikipedia.org/wiki/Yoda_conditions

Le poti face si invers, $forum_data['id'] == 11.

PHP Developer - Not available for freelancing right now

Daca ai de gand sa postezi la categoria IPB, nu uita sa citesti regulamentul: Link regulament

Posted

Un if un HTML nu exista, poate in PHP.

if (11 == $forum_data['id']) {
    Ce sa faca..
} elseif (12 == $forum_data['id']) {
    Ce sa faca..
}

If-urile is in modu Yoda: https://en.wikipedia.org/wiki/Yoda_conditions

Le poti face si invers, $forum_data['id'] == 11.

Astea le pun in css sau jos in codul html? Si trebuiesc incluse intr-un tag sau cum? Explain me pls...

  • Moderators
Posted

In fisierele CSS nu ai cum sa pui cod PHP.

Astea vin in partea unde vrei sa faci ceva cu codu ala, globalTemplate, boardIndexTemplate, forumIndexTemplate, etc, totu depinde ce vrei sa faci.

PHP Developer - Not available for freelancing right now

Daca ai de gand sa postezi la categoria IPB, nu uita sa citesti regulamentul: Link regulament

Posted

asa trebuie?

 

<php>
if (11 == $forum_data['id']) {
    {$icon} == fa-fa-briefcase
} elseif (12 == $forum_data['id']) {
    {$icon} == fa-fa-comments
}
</php>

 

  • Moderators
Posted

Pai ala-i codu.

Doar ca nu asa se da valoare la o variabila.

$variabila = 'cod string';

Aia ce vrea el sa faca din cate vad e asta de sus:

$icon = 'fa-fa-comments';

Si cu $icon dupa nu stiu ce vrea sa faca.

PHP Developer - Not available for freelancing right now

Daca ai de gand sa postezi la categoria IPB, nu uita sa citesti regulamentul: Link regulament

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.