atari Posted October 28, 2007 Report Share Posted October 28, 2007 Ir sekojosh skripts: <?php if ($userid=$my->id == "66") { echo "<b>kautkaads teksts ja sakriit ar id</b>"; } else { echo "<b>kautkaads teksts ja nesakriit ar id</b>"; } ?> Ir vajadziiba pievienot id veetiibas ( tagad tur ir veertiiba 66, vajadzeetu piem. 50, 51, 52 utt.), kopaa 100. Kas buutu jaapierksta klaat, jau esoshai veertiibai, lai taas atdaliitu? Link to comment Share on other sites More sharing options...
hackerman Posted October 28, 2007 Report Share Posted October 28, 2007 (edited) Liec to visu iekš cikla. Edited October 28, 2007 by hackerman Link to comment Share on other sites More sharing options...
Vebers Posted October 28, 2007 Report Share Posted October 28, 2007 Variants #1: if ($userid=$my->id == "66" || $userid=$my->id == "56") Variants #2: $ids = array( 0 => 56, 1 => 34, 2 => 33 ); if (in_array($userid=$my->id, $ids)) Link to comment Share on other sites More sharing options...
atari Posted October 28, 2007 Author Report Share Posted October 28, 2007 php esmu tikai iesaaceejs, vienkaarshaak nevar to izdariit, kaut kaa atdalot veertiibas, teiksim 66;67;68 utt vai 66,67,68 ? Link to comment Share on other sites More sharing options...
hackerman Posted October 28, 2007 Report Share Posted October 28, 2007 Tev tur ir atsevišķi id vai kautkāds intervāls piem no 1-100 vai 10, 23, 45, 95, 100. ? Link to comment Share on other sites More sharing options...
atari Posted October 28, 2007 Author Report Share Posted October 28, 2007 atsevišķi, var teikt randomaa Link to comment Share on other sites More sharing options...
Vebers Posted October 28, 2007 Report Share Posted October 28, 2007 atari, izmanto manis ieteikto variantu #2 , idels tavam vajadzibam, uztaii masivu ar iespejmiem ID un viss.. Link to comment Share on other sites More sharing options...
atari Posted October 28, 2007 Author Report Share Posted October 28, 2007 MakaTaNaw! Lielais cilveeciskais paldies! Tagad chikinieks. Link to comment Share on other sites More sharing options...
Recommended Posts